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

StackOverflow https://stackoverflow.com/questions/6827196

  •  26-10-2019
  •  | 
  •  

문제

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 so, 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)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top