Click to See Complete Forum and Search --> : how to postback in textBox


Ravanan
February 10th, 2005, 03:56 AM
Iam calling this function via keypress event in a TextBox

<asp:textbox onkeypress="__doPostBack('TextBox1','1');" id="TextBox1" >


function __doPostBack(eventTarget, eventArgument)
{
* var theform;
*** *** theform = document.Form1;
**** *****theform.__EVENTTARGET.value =eventTarget.split("$").join(":");
**** *****theform.__EVENTARGUMENT.value = eventArgument;
**** *****theform.submit();
**** ****
}


This is posting back.
But i want the text in the TextBox to be updated to watever i typed in it , probably a letter added to textbox's text when it is posting back
but the textbox is not updated to watever i typed in it.
Its simply blank.

i need your suggestions
ThankYou

Sukim
February 13th, 2005, 08:02 PM
Hi,

Did you check the EnableViewState property

Thanks

Ravanan
February 14th, 2005, 03:28 AM
Yes is enabled by default-the viewstate
Thank you sukkim

regards
Ravanan

cmiskow
February 14th, 2005, 09:24 AM
Does your textbox need runat="server" ?

Sukim
February 14th, 2005, 09:32 AM
what does Request("TextBox1") give you??