Link to home
Start Free TrialLog in
Avatar of gaz_sellout
gaz_sellout

asked on

VB.NET Open Page Code

Does anybody know what code I can use to make a command button open another aspx page?  I suppose this is similiar to a 'link'.

Any help would be great,
Thanks,
Gareth
Avatar of iboutchkine
iboutchkine

In a button code put
Respond.Redirect("yourpage.aspx")
ASKER CERTIFIED SOLUTION
Avatar of iboutchkine
iboutchkine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gaz_sellout

ASKER

Thanks for the help guys.

The problem I have is that I must also use this for a mobile app. and 'Response.Redirect("yourpage.aspx")' throws up an error:

"Calling Response.Redirect on a postback can have unpredictable results on mobile devices and gateways. Use MobilePage.RedirectToMobilePage method instead."

However, I cannot get "MobilePage.RedirectToMobilePage" to work. Any further suggestions on this?
Is this in a ASP.NET application?


AW
your mobile form is already inherited from MobilePage.
just call
Me.RedirectToMobilePage(pagetoredirect)