Results 1 to 7 of 7

Thread: Modal Page

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Philippines
    Posts
    218

    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.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Philippines
    Posts
    218

    Re: Modal Page

    Hi,

    Ok thank you for your quick reply. I'll give a try on jQuery.

  4. #4
    Frenzied Member
    Join Date
    Mar 2004
    Location
    Orlando, FL
    Posts
    1,618

    Re: Modal Page

    Quote Originally Posted by rpc86 View Post
    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.

  5. #5
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    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.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Philippines
    Posts
    218

    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.

  7. #7
    Frenzied Member MattP's Avatar
    Join Date
    Dec 2008
    Location
    WY
    Posts
    1,227

    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
  •  



Click Here to Expand Forum to Full Width