?
Solved

VB.NET Open Page Code

Posted on 2004-04-13
6
Medium Priority
?
1,041 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:gaz_sellout
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 28

Expert Comment

by:iboutchkine
ID: 10814060
In a button code put
Respond.Redirect("yourpage.aspx")
0
 
LVL 28

Accepted Solution

by:
iboutchkine earned 400 total points
ID: 10814071
sorry typo
must be
Response.Redirect("yourpage.aspx")
0
 
LVL 12

Assisted Solution

by:esteban_felipe
esteban_felipe earned 100 total points
ID: 10814101
Hi gaz_sellout,

If you want to open a new window then use an usual javascript function with window.open():
<input type="button" OnClick="javascript:window.open('newpage.aspx');">


Before you ask.... No, you can't open new windows from server side code.. You could write server side code that renders the javascript function to open the new window, but IMO that's a waiste of work.


Esteban Felipe
www.estebanf.com
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

Author Comment

by:gaz_sellout
ID: 10814163
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?
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 10814381
Is this in a ASP.NET application?


AW
0
 

Expert Comment

by:BusyPhoto
ID: 10841330
your mobile form is already inherited from MobilePage.
just call
Me.RedirectToMobilePage(pagetoredirect)
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question