Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 154259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:56:50+00:00 2026-05-11T09:56:50+00:00

I have a Page which has a Control on it with 2 textboxes (username

  • 0

I have a Page which has a Control on it with 2 textboxes (username and password) and an asp:Button. If the user’s membership is going to expire within 30 days and the button is clicked, I want the JQuery dialog to popup. Inside the JQuery dialog, I have some text and an asp:LinkButton. The link button has an event attached to it, but it is not being fired when I click it in the dialog box. Here is the script tags for the JQuery:

<script type='text/javascript' src='jquery-1.3.2.js'></script> <script type='text/javascript' src='ui.core.js'></script> <script type='text/javascript' src='ui.draggable.js'></script> <script type='text/javascript' src='ui.resizable.js'></script> <script type='text/javascript' src='ui.dialog.js'></script> 

Here is the script the dialog: For testing, I am closing the dialog on Renew Membership click, but I actually want it to fire a method I create in asp.net to direct the user to a another page and pass a session variable.

<script type='text/javascript'>     $(document).ready(function() {         $('#dialog').dialog({          // autoOpen: false,             modal: true,             buttons: { 'Renew Membership': function() { $(this).dialog('close'); } }         });     }); </script>  <asp:Content ID='mainContent' runat='server' ContentPlaceHolderID='Content'> <div id='dialog' title='Membership Renewal'>     <p>Uh Oh! Your membership is going to expire.</p><br />     <p>Hurry up and renew today!</p><br />     <asp:LinkButton runat='server' Text='Click Here to Renew'          onclick='Unnamed2_Click'></asp:LinkButton> </div> 

Here is the click event for the LinkButton:

protected void Unnamed2_Click(object sender, EventArgs e) {     UserProfiles userProfile = (UserProfiles)Session['userProfile'];     Response.Redirect('~/Renew.aspx'); } 

What should happen is that when the user clicks the sign-in button, it should popup up the dialog only if the days they have left to expire is <= 30 and if they do, they have the option of clicking the link in the dialog and going to a renew page where I want to pass it a Session variable with a Profile, but that is not being called, so I guess, I would like to know is how can I add the event handler of the button to the dialog and is there a way to set it so that it only comes up once, for example adding a cookie to the users browser and only showing it if they don’t have a cookie set.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:56:51+00:00Added an answer on May 11, 2026 at 9:56 am

    I believe this is more of an ASP.NET issue and not a jQuery dialog issue.

    I wouldn’t use the onClick and PostBackUrl within the same LinkButton. So, take off the PostBackUrl attribute and instead use

    protected void Unnamed2_Click(object sender, EventArgs e){     UserProfiles userProfile = (UserProfiles)Session['userProfile'];     Response.Redirect('~/Renew.aspx'); } 

    If you only need to show the control when the user is > 30 days. I would create a user control.

    jquery.renewDialog.js

    $(document).ready(function() {     $('#dialog').dialog({         modal: true     }); }); 

    RenewalUserControl.ascx

    <asp:ScriptManager runat='server' id='ScriptManager1'>   <Scripts>     <asp:ScriptReference Path='jquery.renewDialog.js' />   </Scripts> </asp:ScriptManager> <div id='dialog' title='Membership Renewal'>     <p>Uh Oh! Your membership is going to expire.</p><br />     <p>Hurry up and renew today!</p><br />     <asp:LinkButton runat='server' Text='Click Here to Renew'          onclick='Unnamed2_Click' /> </div> 

    Login.aspx

    <uc1:RenewalUserControl runat='server' ID='RenewalUserControl1' Visible='false' /> 

    Login.aspx.cs

    if (user.IsExpired) {   RenewalUserControl1.Visible = true; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 75k
  • Answers 75k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Look at the Dictionary<TKey, TValue> class: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx May 11, 2026 at 2:37 pm
  • added an answer Read Improved Persistent Login Cookie Best Practice (both the article… May 11, 2026 at 2:37 pm
  • added an answer The arguments to the second line of the while loop… May 11, 2026 at 2:37 pm

Related Questions

I have a WPF Window which has a among other controls hosts a Frame.
Ok, I know how to do this, but I want to know if this
I have a ASP.NET page which has a form on it. It also has
I haven't got a unique problem, but for the life of me I can't

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.