Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Textbox in Updatepanel doesnt submit text

Textbox in Updatepanel doesnt submit text

Textbox in Updatepanel doesnt submit text


Here's my ASPX page:


<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/DEF.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>

<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderBodyAreaClass" runat="server">
        <link href="Content/css/jquery-ui.css" rel="stylesheet" type="text/css" />
        <link href="Content/CSS/AdminStyles.css" rel="stylesheet" type="text/css" />

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

    <script type="text/javascript" src="Scripts/js/jquery-1.11.2.js"></script>
    <script type="text/javascript" src="Scripts/js/jquery-ui.js"></script>


<asp:Content ID="BodyContent" ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <asp:UpdatePanel ID="UpdatePanel4" runat="server"  >
            <asp:Label ID="lblError" runat="server"  ForeColor="Red" Text=""></asp:Label>
            <asp:Button ClientIDMode="Static" ID="Button1" runat="server" Text="DIALOG" 
                OnClientClick="Dlg();return false;" 

    <div id="dialogQuests" class="dialogQuestsClass">
        <div class="headerDivBlock">QUESTION</div>
        <div class="contentDivBlock">
            <asp:UpdatePanel ID="UpdatePanel6" runat="server" >
                    <table id="tableSizePositionQuest">
                                <asp:TextBox ID="txtGroup" runat="server"></asp:TextBox>
                            <td colspan="2">
                                <asp:Button ID="btnQuestSave" runat="server" UseSubmitBehavior="false" Text="Save ASYNC" OnClick="btnQuestSave_Click"  />

    <script type="text/javascript">

        function Dlg()
            $('#dialogQuests').dialog({ minWidth: 840, resizable: true });



When I click on "Save ASYNC" button txtGroup comes empty in btnQuestSave_Click. I wonder what's wrong with my project.

RE: Textbox in Updatepanel doesnt submit text

try removing UseSubmitBehavior="false"

RE: Textbox in Updatepanel doesnt submit text

Without UseSubmitBehavior it won't show me this dialog box at all.

RE: Textbox in Updatepanel doesnt submit text

I don't know much about UpdatePanels, I never use them.
But I believe you need to added a trigger to the updatepanel for the button and you need to move the label into the contenttemplate of the updatepanel

RE: Textbox in Updatepanel doesnt submit text

Adding triggers doesn't work at all because it's about external controls to be used as an event source for updatepanel. All internal controls are included in triggers by default. Also I tried your idea with expected result - no text, no server function call.

RE: Textbox in Updatepanel doesnt submit text

Sorry, I used google to get my ideas, like I said, i never use update panels
good luck

post your answer when you get it

RE: Textbox in Updatepanel doesnt submit text

Hi guys,

I seem to have found the solution. See the link:

CODE --> JavaScript

            function EndRequestHandler(sender, args) {
                var elId = sender._activeElement.id;

                if (elId.indexOf("btnAddTypeQuest") > -1 || elId.indexOf("btnEditQuest") > -1) {
                        maxHeight: 600,
                        minWidth: 840,
                        open: function (type, data) {

                if (args.get_error() != undefined) {

The crucial thing is in bold.

RE: Textbox in Updatepanel doesnt submit text

Thanks for posting your solution. It may help someone in the furture

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close