Razieru
Razieru

Reputation: 492

How to open URL to asp-site with parameter

I have a site written on asp.net with an input form. Default URL = 172.30.0.1/Orion/Nodes/Add/Default.aspx?&restart=false. Input form params =

<input name="ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$adminContentPlaceholder$HostNameIP1$txtHostNameIP" type="text" value="172.30.24.12" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$adminContentPlaceholder$HostNameIP1$txtHostNameIP\',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_ctl00_ctl00_BodyContent_ContentPlaceHolder1_adminContentPlaceholder_HostNameIP1_txtHostNameIP" style="width:250px;">

And now a question: what must I do with URL to make a change value in input form (where now equal "172.30.24.12") to "172.30.10.29"? url like

172.30.0.1/Orion/Nodes/Add/Default.aspx?&restart=false&ctl00$ctl00$ctl00$BodyContent$ContentPlaceHolder1$adminContentPlaceholder$HostNameIP1$txtHostNameIP='172.30.10.29'

doesn't work.

Upvotes: 0

Views: 448

Answers (1)

dave
dave

Reputation: 2371

I am not sure if I fully understood your question, but if you are trying to pass a parameter and assign to a input value, do something like that:

url= 172.30.0.1/Orion/Nodes/Add/Default.aspx?restart=false&ip=172.30.10.29

And assign the value in Page_Load event:

> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
>             
>     txtHostNameIP.Text = Request.QueryString("ip").ToString()
>     
>End Sub

Hope this help

Upvotes: 1

Related Questions