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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vijay YadavRank #1,637 · 943 reputationPosted May 10, 2011, 3:55 AM EDT
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. :)
Mayur GujrathiRank #666 · 3.6K reputationPosted May 10, 2011, 4:09 AM EDT
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 YadavRank #1,637 · 943 reputationPosted May 10, 2011, 4:30 AM EDT
Your code seems to be correct. Can you please just comment the page load event statement and check what is happening?
Mayur GujrathiRank #666 · 3.6K reputationPosted May 10, 2011, 4:46 AM EDT
but no difference