开发者

I have 1 textbox and checkbox in webform1 and one textbox in seconf webform in vb.net !

开发者_StackOverflow中文版

I have textbox1 in Default.aspx vb.net page with textbox1.text="Sumit"

On button click event I redirect to Default2.aspx and in Default2.aspx when i click on LinkButton1 then i redirect back to Default.aspx

But then i see the textbox1.text will remove but i want the textbox1.text="Sumit" after i redirect to textbox1 again ..


Store the value of the textbox in Session in the button click event:

Session("textbox1_text") = textbox1.text

Then in Page_Load event have such code:

textbox1.text = Session("textbox1_text")

Note, this will set the text to the last text the user wrote always, not just when redircting from page2 so you can add flag on the URL when redirecting and check that flag before assigning the textbox value from session.


If you use Response.Redirect() it will load new page .Use Cookies to store TextBox Values

check this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜