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 8402897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:11:56+00:00 2026-06-09T22:11:56+00:00

I have ASCX control, that basically contains just a DIV with few ASP buttons

  • 0

I have ASCX control, that basically contains just a DIV with few ASP buttons inside. My Master Page contains an ASP.NET form, that I want to cause postback when one of aforementioned buttons are pressed. This DIV is invisible by default and becomes visible to serve as a dialog, which is handled by JQuery plugin BlockUI. So, at some point user will see this DIV and I want a postback to happen when user clicks button.

My problem is: the ASCX is attached to MasterPage via direcitve:

 (file MasterPage begins:)

 <%@ Master Language="C#" Inherits="GIUMasterPage" CodeBehind="MasterPage.master.cs"
AutoEventWireup="True" %>
 <%@ Register Src="uscMsgBox.ascx" TagName="uscMsgBox" TagPrefix="uc2" %>

 (HTML head, body form opening tags are below). 

Examination of the page shows that its DIV appears at the end of resulting HTML code outside the form tag. In result, when it is visible and button is hit, postback did not happened. I went further, attaching on button’s onClientClick property javascript call to __doPostBack function. Postback started to happen, but there was no invocation of button’s handlers.

I am sure that if ASCX’s DIV code will appear within form HTML tags, postback will happen as proper.

So, my question is, how I can command to put ASPX’s DIV content within FORM tags, not at the end of page, by some directive? I may alter MasterPage and ASPX itself.

  • 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. Editorial Team
    Editorial Team
    2026-06-09T22:11:58+00:00Added an answer on June 9, 2026 at 10:11 pm

    The jQuery UI Dialog moves itself to the end of the body, outside of your form. The trick is to move the dialog div back inside your form when you open it.

    example

    See https://stackoverflow.com/a/1140541/26226 and http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with-aspnet-and.html.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an .ascx control inside la page. In that control, I have a
I have two instances of an Address.ascx control in an ASP.NET MVC page. <h1>Shipping
I have an ASP.NET user control (.ascx file). In this user control I want
my structure is like this: master page aspx(web form) ascx(user control) I have a
I have a User control(ascx) that has an Update panel. When the page is
I have a simple user control that contains some buttons that fire events which
I have a custom user control (ascx) that contains a textbox and a Javascript-based
I have an ascx that uses Eval in a repeater like this: <%@ Control
I have a .aspx page that loads three separate .ascx controls to represent adding,
I have made a basic ascx control which is just a panel with a

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.