|
-
Apr 26th, 2013, 03:45 AM
#1
Thread Starter
Addicted Member
Modal Page
Hi guys,
Maybe some of you have answer for this. How to create a modal page ?
Say I have a default.aspx and within this page I have a "Find" button.
I do also have "Find.aspx" with a label and a textbox plus a gridview.
What I need is when I click "Find" button, the Find.aspx will show up and the hosting
page is greyed and cannot be used, only the "Find.aspx" page.
Just like in vb6, it has vbmodal.
I tried response.redirect the "Find.aspx" but the problem is the hosting page.
It forgets/resets all the fields values.
I am using ASP.Net 4 / VS 2010
Please help me with this.
Many thanks.
Last edited by rpc86; Apr 26th, 2013 at 03:49 AM.
-
Apr 26th, 2013, 03:52 AM
#2
Re: Modal Page
You should probably look into using the jQuery Dialog:
http://jqueryui.com/dialog/
It allows a div in your page to behave much like a modal dialogue in a Windows app.
-
Apr 26th, 2013, 04:41 AM
#3
Thread Starter
Addicted Member
Re: Modal Page
Hi,
Ok thank you for your quick reply. I'll give a try on jQuery.
-
Apr 26th, 2013, 01:30 PM
#4
Frenzied Member
Re: Modal Page
 Originally Posted by rpc86
Hi,
Ok thank you for your quick reply. I'll give a try on jQuery.
The AJAX toolkit has one too, but, well, the toolkit blows all around...
Sean
Some days when I think about the next 30 years or so of my life I am going to spend writing code, I happily contemplate stepping off a curb in front of a fast moving bus.
-
Apr 26th, 2013, 05:58 PM
#5
Re: Modal Page
You can use the ModalPopupExtender that i think Sean is implying. It's stable IMO, one of the useful things Ajax has.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Apr 29th, 2013, 01:35 AM
#6
Thread Starter
Addicted Member
Re: Modal Page
Hi,
Ok. I have installed AJAX Control Toolkit for ASP.Net 4. I tried following the given samples for ModalPopupExtender but what I notice is the host page still active, not greyed. I've seen other web pages that after clicking the Find button, a new web page appears and the host page is disabled. But this one is not.
-
Apr 29th, 2013, 08:48 AM
#7
Re: Modal Page
Have you set the BackgroundCssClass property of the ModalPopupExtender?
Something like:
Code:
.popupBackground {
height: 100%;
overflow: scroll;
background-color: #C0C0C0;
filter: alpha(opacity=70);
opacity: 0.7;
}
I would like to say that I prefer John's suggestion of using jQuery's dialog though.
This pattern in common to all great programmers I know: they're not experts in something as much as experts in becoming experts in something.
The best programming advice I ever got was to spend my entire career becoming educable. And I suggest you do the same.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|