Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 27, 2011 10:09 PM by Darkestnight
Oct 27, 2011 09:37 PM|LINK
Hello guys I hope you can help with an issue I can't figure out, thanks in advance.
The problem I'm having is with a textbox that apparently loses it's value when postbacked ,the situation is the following:
The form is used for a catalog, It has a gridview that displays the entries in the database, inside the gridview I have a linkbutton that is used as the edit button, when the user clicks it, it fills a textbox(inside an invisible div at this moment) with
the value from the database for the chosen item in the grid and after that it displays the div as a modal using jquery, I do this jquery script call from server side. The C# code is the following:
/*here i just get the database values ,fill a label and the textbox with them( it works fine)*/
CatalogBusiness.GetObjectData(IDObject , out ArrayResult);
txtNomTipEdit.Text = ArrayResult;
lbIDType.Text = ArrayResult;
/*Here i insert the jquery code to open the modal (apparently works fine)*/
the aspx code is the following
<div class="modalUp" style="z-index: 2;">
Object Name<span style="color: Blue">*</span></td>
<asp:Label runat="server" ID="lbIDType" CssClass="Hide"></asp:Label>
<td><asp:TextBox runat="server" ID="txtNomTipEdit" ValidationGroup="NewObj1"></asp:TextBox>
<asp:RequiredFieldValidator runat="server" ID="RfvtxtNomTipEdit" ControlToValidate="txtNombreObjeto"
<asp:LinkButton runat="server" ID="BtnUpdate" Text="Actualizar" CssClass="btnUpdate"
<button type="button" class="close">
At this point everything is apparently working fine, but when I change the text inside the textbox then click the update button(BtnUpdate) it goes to the click event and whenever I try to retrieve the value from the textbox it is always blank "" value. Also
I fill a label with some values from the database and it keeps the value.
I use this modal technique for inserting items in this same aspx and that part is working fine, I can't figure out what can be the problem I would really appreciate your help.
Oct 27, 2011 10:09 PM|LINK
Never mind guys , I just moved the content to a different div and it started working, I really don't know what was the problem with this issue, perhaps some strange bug.