Search code examples
c#asp.netajaxcontroltoolkit

ASP.NET modal popup, entirely from code behind?


What I am trying to do is create a bit of reusable code that can write a modal popup, either through javascript or using the ajaxcontrol toolkit all from the code behind.

The modal would be a sort of login pop up for controlling access to more restricted areas of the website allowing certain users to re-credential in for higher access.

I was thinking of doing a user control but I forsee some problems with passing all of the appropriate information along without it being completely hoaky.

If anyone has any good links or advice for doing so it would be greatly appreciated!

Thanks!

EDIT: I know how to use the ajax control toolkit and its controls, and I know how to make login screens, I'm asking how to do this entirely from the code behind from a class that would be independent of its implementation


Solution

  • Write a server control or an asp.net extender control like ajax control toolkit does.

    The best you can do is download the source of AjaxControlToolkit from CodePlex and explore the source of ModalPopup within that.