开发者

How can I pass textbox value from usercontrol(ascx) to another page (aspx) using Server.Transfer()

I am writing one user control (webpart) in kentico. I want to pass textboxes' value from usercontrol to aspx page using Server.Transfer().

Can it be? If 开发者_如何学Cso, how can I do like that?

Best Regards,

Reds


I don't particularly like this method, I prefer to use Sessions to pass data between pages, but if you need to do this here how it's done according to the this page.

Here's TL;DR summary. It requires three scripts/pages:

Form.ascx - this will be the control that contains the text box value.

FormParsingScript.aspx (referenced in the Form.ascx in the Action attribute) - this will perform the actual Server.Transfer "FinalScript.aspx" call

FinalScript.aspx which will display the contents of Response.Form["TextBoxName"] (HTTP POST) or Response.QueryString["TextBoxName"] (HTTP GET)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜