Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wizard control inside an AJAX ModalPopupExtender?

Status
Not open for further replies.

NuJoizey

MIS
Aug 16, 2006
450
US
The idea would be really great, but is this possible?

as the wizard causes postback every time the "next" button is clicked, and therefore makes the entire modal popup go away.

Is there a way to combine these two controls such that the modal popup does not go away until the wizard is complete?

If so can someone provide me with some sort of example?

thanks!
 
wrap the wizard in an updatepanel and set the update mode to conditional with children as triggers.
Code:
<asp:modalpopup>
   <asp:updatepanel>
      <asp:wizard />
   </asp:updatepanel>
</asp:modalpopup>
since the modal popup hides controls before they are needed, you may need to set some properties at runtime instead of design time.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
ok thanks. I was on the right track trying that, but i couldn't get it to work. But at least now I know my idea on how it might be done is shared by at least one other person! I will try again.
 
ok, i've gotten it to behave pretty much as i want except for one thing:

if i make the modalpopup draggable, then if a user drags it across the screen and then hits the "next" button on the wizard control, the
wizard always returns to its original posistion.

I would be greatful for any hints or ideas you could give on how to make it so that the modalpopup window containing the wizard retains its screen position while going thru wizard steps.
 
seems like the position of the modalpopup is reset when the postback occurs (it does occur, the updatepanel hides it). so you need to capture the current coordinates of the modal popup when the updatepanel begins the update and write these values back when the update panel completes. this is probably done on the client (js) not code behind.

as for the details of implementing this. I'm not familiar enough with the ms ajax library to answer that. you may want to try the codeplex forum for ms ajax, or asp.net forums.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
is it me, or does a lot of .net programming seem like it involves writing code to combat the default behaviour of the controls?

Maybe it's my approach, but I always feel like I'm at war with the framework. I never feel like i'm working "with" it.

y'know what i mean?
 
you are absolutely correct. WebForms and MS AJAX works great for simple data = gui pages. but the minute you create something slightly complex you fight the framework to get what you want.

the problem is webforms autogenerates the html and has all kinds of abstractions which make it difficult to minipulate. the html webforms can't function with viewstate/postbacks. even the updatepanel preforms a full postback, it simply hides this in an ajax call. so there is very little preformance gain.

It seems most/all of my developer mentors have abandoned webforms all together is favor of manual html rendering using either MonoRail, MS MVC or some variation of MVC. This allows you to do whatever you want with the html. It also requires much better html, js and css skills.

I'm still with you fighting the framework to get what i want. Fortunately my GUI's need to be simple. so fancy ajax/css tricks are not required.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top