Hello all
I am taking inputbox in following way
and on button click it is getting null after sending this value to database to do some operations
How to avoid that
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mayur GujrathiPosted May 10, 2011, 8:46 AM
but no difference
Vijay YadavPosted May 10, 2011, 8:30 AM
Your code seems to be correct. Can you please just comment the page load event statement and check what is happening?
Mayur GujrathiPosted May 10, 2011, 8:09 AM
like this
function ViewSIGN() {
form1.hdtext.value = form1.txtvalue.value;
}
hdtext is one more html control like following
and then on page load i am doing like this
If IsPostBack = False Then
txtvalue.Value = Request("hdtext")
'txtvalue.Value = hdtext.Value
End If
also on isnotpostback i did same
txtvalue.Value = Request("hdtext")
and again for sake of me i also did same on button click
but value is coming in hdtext but why not in txtvalue
Vijay YadavPosted May 10, 2011, 7:55 AM
May be your page load is firing again on button click.
If you have written any on page load then check isPostback property ofpage load event. :)