Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Navigation

  Asked By: Rainhard    Date: Jun 23    Category: Asp.net    Views: 647
  

this is maybe a very stupid question, but i can't find the syntax...

i just want to click a button on webform1 and navigate to webform2 using parameters that i can get with request.Querystring

Thus something like i used to write in Javascript and classical ASP:


function SelectClient(ID)
{
var myStr= "KiesArtikels.asp?KlantID=" + ID + "&AO=0";
document.URL=myStr;

}
<input type="button" onclick="javascript:SelectClient">


But i don't find an instruction like document.URL in VB.NET...

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Ludkhannah Fischer     Answered On: Jun 23

If you create an asp button  on the web form and put this in the event
handler:

Response.Redirect("KiesArtikels.asp?KlantID=" + ID + "&A0=0", true);

then in the other page you can access your request  variables by doing:

if(Request["KlantID"] != null)
do whatever...

 
Answer #2    Answered By: Sairish Kauser     Answered On: Jun 23

Please provide a little more detail about what webform1 and webform2 do. Instead of relying on cleint side scripting being enabled, you can have your aspx page post to itself and do your checking in webform1


If Page.IsPostBack Then
Dim needToRedierect as Boolean = False
' Put code here to check to see if you need to reditrect
If needToRedirect Then
response.redirect("webform2.aspx")
End If

End If

 
Answer #3    Answered By: Javairea Akram     Answered On: Jun 23

That's true => response.Redirect still exists.

 
Didn't find what you were looking for? Find more on Navigation Or get search suggestion and latest updates.




Tagged: