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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:47:33+00:00 2026-06-12T09:47:33+00:00

I have a div to which i am showing in jquery modal pop up.

  • 0

I have a div to which i am showing in jquery modal pop up. I have a textbox inside it and a button. on click of that button i am sending the request on code behind side. now when i tries to get the textbox’s value it comes “”, every time. Below is my html.

<div id="divDelete" runat="server" style="display: none;">
        <div>
            <div>
                <h2>
                    Are you sure you want to delete your wishisdone account?</h2>
                <p>
                    Is there anything that can make you reconsider? Contact our support, if you have
                    any problems and we will help you.</p>
                <p>
                    If you wish to continue, and delete your account, be aware that we will only keep
                    your files for 30 days and then they will be permanently deleted. You can reactivate
                    your account at any time within 30 days by logging back in.
                </p>
                <p>
                    Please, let us know the reason for your decision, so we can make our services more
                    convenient to use.</p>
                <br />
                <label class="blackLabel">
                    Password&nbsp;<span class="mandatory">*</span></label>
                <p>
                    <asp:TextBox ID="txtPassword" CssClass="greyInputLarge" runat="server"></asp:TextBox>
                    <br clear="all" />
                    <span class="error" id="spPassword" runat="server"></span>
                </p>
                <label class="blackLabel">
                    Why are you leaving?&nbsp;</label>
                <p>
                    <asp:DropDownList ID="drpReasonOfDelete" CssClass="greySelectLarge" runat="server">
                        <asp:ListItem Text="I have another WishIsDone account" Value="1"></asp:ListItem>
                        <asp:ListItem Text="I haven't registered this account" Value="2"></asp:ListItem>
                        <asp:ListItem Text="No need in service anymore" Value="3"></asp:ListItem>
                        <asp:ListItem Text="Technical problems" Value="4"></asp:ListItem>
                        <asp:ListItem Text="WishIsDone is too slow for me" Value="5"></asp:ListItem>
                        <asp:ListItem Text="Some features do not work" Value="6"></asp:ListItem>
                        <asp:ListItem Text="I don't understand how to use WishIsDone" Value="7"></asp:ListItem>
                        <asp:ListItem Text="Other" Value="8"></asp:ListItem>
                    </asp:DropDownList>
                </p>
                <label class="blackLabel">
                    Please, explain further&nbsp;</label>
                <p>
                    <asp:TextBox ID="txtReason" CssClass="greyInputLargeForMultiline" runat="server"
                        TextMode="MultiLine"></asp:TextBox>
                </p>
                <asp:HiddenField ID="hdfPassword" runat="server" />
                <br clear="all" />
            </div>
        </div>
    </div>

and my jquery file is

$(document).ready(function () {
var $Error1 = $('[id$=divDelete]').dialog({
    autoOpen: false,
    resizable: false,
    modal: true,
    height: 'auto',
    width: 580,
    title: "Deactivate Account",
    buttons: {
        "Close": function () {
            $Error1.dialog('close');
        },
        "Delete my account": function () {
            if ($('[id$=txtPassword]').val() == '') {
                $('[id$=txtPassword]').css('border', '1px solid red');
                $('[id$=spPassword]').text("You can't leave this empty.");
                return false;
            } else {
                var password = $('[id$=txtPassword]').val();

                $('[id$=hdfPassword]').val(password);
                alert($('[id$=hdfPassword]').val());
                $('[id$=Button1]').click();
            }
        }
    },
    close: function (event, ui) {
    },
    open: function () {
    }
});

$('[id$=btnOpenPopUp]').live('click', function (e) {
    e.preventDefault();
    openPopUp();
});

function openPopUp() {
    $Error1.dialog('open');
}

var querystring = GetQueryStringParams('delete');
if (querystring == '1') {
    openPopUp();
}
});
function GetQueryStringParams(sParam) {
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++) {
    var sParameterName = sURLVariables[i].split('=');
    if (sParameterName[0] == sParam) {
        return sParameterName[1];
    }
}

}

Code behind code is

protected void Button1_Click(object sender, EventArgs e)
{
    if (!string.IsNullOrEmpty(Request.QueryString["delete"]) && !string.IsNullOrEmpty(Request.QueryString["u"]))
    {
        try
        {
            Guid userId = new Guid(Convert.ToString(Request.QueryString["u"].ToString()));
            objUsers.Id = userId;
            objUsers.Status = "T";
            objUsers.ModifiedOn = DateTime.UtcNow;
            string password = txtPassword.Text;
            string newass = hdfPassword.Value;
                       }
        catch
        {
            Response.Write("There is some error while deleting the account.");
        }

    }
}

Please help me, when i tried to get it by alert() it returning the entered value in textbox. but in code behind it comes “”. i am totally confused why its happening?Please help me.

  • 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-12T09:47:35+00:00Added an answer on June 12, 2026 at 9:47 am

    From the top of my head, I think this is because when using jQuery UI Dialog, it actually takes the contents of the <div> and then appends this to the body of the html.

    As a result, the <input> tags are now outside of the <form> tag.

    So on PostBack the controls are not actually posted within the content of the request.

    Here are some solutions to the problem.

    Input inside Jquery UI Dialog not being sent?

    jQuery UI Dialog with ASP.NET button postback

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

Sidebar

Related Questions

I have a DIV which I want to be removed when I click a
I have a jQuery ajax function that loads some content into a div, some
I have a div, inside which there is a some text and a number
I have developed a jQuery plugin which does the job of showing and hiding
I have asp button, which functionality is for deleting the item. Button is inside
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
I have DIV element which only has a few lines in and a background
I have div class=contentBlock which is treated as the container for updating <div class=contentBlock></div>
I have div ( #child ) which won't expand to the full height of
I have a div which contain lots of input[type=text] fields. I want to put

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.