I have this code behind a button that does not work:
Dim sQuote As String = txtQuoteNum.Tex t
Dim iQuote As Int32 = CType(sQuote, Int32)
Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString
Response.Redire ct(sUrl)
I have just deployed this asp.net app to the server and have wierd
response.redire ct behavior. Some pages redirect without any issue but this
button does not work. It just blanks out the current page and keeps the
current URL. If I change it to a response.write with the sUrl string and
then past it into the url it works just fine. I'm running framework 1.1
Thanks in advance,
DougS 5 4355
Try this:
Response.Clear( )
Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t)
Response.End()
"DougS" <do**@nospam.co m> wrote in message
news:OG******** ******@TK2MSFTN GP15.phx.gbl... I have this code behind a button that does not work:
Dim sQuote As String = txtQuoteNum.Tex t
Dim iQuote As Int32 = CType(sQuote, Int32)
Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString
Response.Redire ct(sUrl)
I have just deployed this asp.net app to the server and have wierd response.redire ct behavior. Some pages redirect without any issue but this button does not work. It just blanks out the current page and keeps the current URL. If I change it to a response.write with the sUrl string and then past it into the url it works just fine. I'm running framework 1.1
Thanks in advance, DougS
if what Chris suggested doesnt work, it could be because of some
exception being raised
I would do a try - catch block around those 4 lines to see if any
exception other than ThreadAbort is being raised
Chris Botha wrote: Try this:
Response.Clear( ) Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t) Response.End()
"DougS" <do**@nospam.co m> wrote in message news:OG******** ******@TK2MSFTN GP15.phx.gbl...I have this code behind a button that does not work:
Dim sQuote As String = txtQuoteNum.Tex t
Dim iQuote As Int32 = CType(sQuote, Int32)
Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString
Response.Redire ct(sUrl)
I have just deployed this asp.net app to the server and have wierd response.redire ct behavior. Some pages redirect without any issue but this button does not work. It just blanks out the current page and keeps the current URL. If I change it to a response.write with the sUrl string and then past it into the url it works just fine. I'm running framework 1.1
Thanks in advance, DougS
Pass it a fully qualified URL for the redirect and see if that makes a
difference.
--
Regards
John Timney
ASP.NET MVP
Microsoft Regional Director
"DougS" <do**@nospam.co m> wrote in message
news:OG******** ******@TK2MSFTN GP15.phx.gbl... I have this code behind a button that does not work:
Dim sQuote As String = txtQuoteNum.Tex t
Dim iQuote As Int32 = CType(sQuote, Int32)
Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString
Response.Redire ct(sUrl)
I have just deployed this asp.net app to the server and have wierd response.redire ct behavior. Some pages redirect without any issue but this button does not work. It just blanks out the current page and keeps the current URL. If I change it to a response.write with the sUrl string and then past it into the url it works just fine. I'm running framework 1.1
Thanks in advance, DougS
Those are good ideas. I tried this:
Try
Response.Clear( )
Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t)
Response.End()
Catch ex As Exception
Me.lblError.Tex t = ex.Message
End Try
I still get the same behavior.
I then tried this:
Try
Response.Clear( )
Response.Write( "http://mydomain/appfolder/Demographics.as px?Quote="
& txtQuoteNum.Tex t)
Response.End()
Catch ex As Exception
Me.lblError.Tex t = ex.Message
End Try
I took the string that resulted from the response.write and pasted it in the
address bar and it worked correctly. Is there some setting I'm missing in
IIS or in my page directives. This is my first ASP.Net app (obviously) and
it's driving me crazy.
Thanks,
DougS
<sr**********@g mail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com... if what Chris suggested doesnt work, it could be because of some exception being raised
I would do a try - catch block around those 4 lines to see if any exception other than ThreadAbort is being raised Chris Botha wrote: Try this:
Response.Clear( ) Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t) Response.End()
"DougS" <do**@nospam.co m> wrote in message news:OG******** ******@TK2MSFTN GP15.phx.gbl... >I have this code behind a button that does not work: > > Dim sQuote As String = txtQuoteNum.Tex t > > Dim iQuote As Int32 = CType(sQuote, Int32) > > Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString > > Response.Redire ct(sUrl) > > > I have just deployed this asp.net app to the server and have wierd > response.redire ct behavior. Some pages redirect without any issue but > this > button does not work. It just blanks out the current page and keeps the > current URL. If I change it to a response.write with the sUrl string > and > then past it into the url it works just fine. I'm running framework 1.1 > > Thanks in advance, > DougS >
I never could figure out why it didnt work. Crazy to spend this much time on
one line of code that should work. I ended up using server.transfer
Thanks,
DougS
"DougS" <do**@nospam.co m> wrote in message
news:eF******** ******@TK2MSFTN GP10.phx.gbl... Those are good ideas. I tried this: Try Response.Clear( ) Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t) Response.End() Catch ex As Exception Me.lblError.Tex t = ex.Message End Try I still get the same behavior.
I then tried this: Try Response.Clear( )
Response.Write( "http://mydomain/appfolder/Demographics.as px?Quote=" & txtQuoteNum.Tex t) Response.End() Catch ex As Exception Me.lblError.Tex t = ex.Message End Try
I took the string that resulted from the response.write and pasted it in the address bar and it worked correctly. Is there some setting I'm missing in IIS or in my page directives. This is my first ASP.Net app (obviously) and it's driving me crazy.
Thanks, DougS
<sr**********@g mail.com> wrote in message news:11******** *************@z 14g2000cwz.goog legroups.com... if what Chris suggested doesnt work, it could be because of some exception being raised
I would do a try - catch block around those 4 lines to see if any exception other than ThreadAbort is being raised Chris Botha wrote: Try this:
Response.Clear( ) Response.Redire ct("Demographic s.aspx?Quote=" & txtQuoteNum.Tex t) Response.End()
"DougS" <do**@nospam.co m> wrote in message news:OG******** ******@TK2MSFTN GP15.phx.gbl... >I have this code behind a button that does not work: > > Dim sQuote As String = txtQuoteNum.Tex t > > Dim iQuote As Int32 = CType(sQuote, Int32) > > Dim sUrl As String = "Demographics.a spx?Quote=" & iQuote.ToString > > Response.Redire ct(sUrl) > > > I have just deployed this asp.net app to the server and have wierd > response.redire ct behavior. Some pages redirect without any issue but > this > button does not work. It just blanks out the current page and keeps > the > current URL. If I change it to a response.write with the sUrl string > and > then past it into the url it works just fine. I'm running framework > 1.1 > > Thanks in advance, > DougS >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: ndessai |
last post by:
Hi All,
I discovered following issue with the VC 7.1 compiler regarding the
backword compatibility.
I created a dll (Redirect.dll) which exposes a function and simply
writes some text (say "Hello World") to stderr stream. I also created a
driver program (driver.exe) and used the exposed function from the above
dll. The driver.exe tries to redirect the stderr stream to a file
"stderr.txt" before calling the method from the dll. (used...
|
by: Peter Row |
last post by:
Hi,
I am writing a DLL in VB.NET that implements IHttpHandler.ProcessRequest.
This code calls a sub and I need to know if that sub did a response redirect
or not.
Specifically I need to know that either the sub did a redirect or a specific
value
was specified in the URL. If neither a redirect was done and a certain value
was
|
by: Brian |
last post by:
I'm trying to response.redirect to another page on a button click event and I get an error message stating that the thread was being aborted (if I trap for the error that is...)
I've researched this a bit and see that this error is supposed to happen in response.redirect, but it's not in a Try Catch statement for me so I don't know why it won't perform the redirect
When the button is clicked the page is simply reloaded with a white screen,...
|
by: Anthony Williams |
last post by:
Hi gang,
This one looks like a bug :o(
As you may or may not know, setting session management in web.config to use
cookieless sessions causes the ASP.NET runtime to munge a session ID into
the URL, in the format http://yourapplicationpath/(Session.SessionID)/...
which saves numerous headaches when it comes to storing state across page
requests and sessions.
|
by: Andy Todd |
last post by:
Hi
We have just moved an ASP.NET application into the live environment which is
as follows:
Sun Proxy Server / Firewall
Windows 2000 Server / IIS5
The URL for the site maps to the Sun proxy box. This translates the request
and maps it to the Win2K server which responds through the proxy. The Win2K
| |
by: Johnny Fugazzi |
last post by:
I have a couple of pages that have started showing an odd problem.
When the code calls Response.Redirect("file.aspx"), nothing happens. The
page goes white, and the old URL and querystring are displayed at the top of
the page. The page that was redirected towards does not come up.
Any ideas?
|
by: venner |
last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET
2.0. The website makes use of a central authentication service (CAS)
provided at the university I work for. Each page checks a session
variable, and if it is not present, does a Response.Redirect to a
webpage for the CAS passing a url parameter for the url to post back
to. The CAS provides a page for the user to log into, validates the
username and password, and then...
|
by: Seb |
last post by:
Hi,
We have a page in VB.NET redirecting to an external site.
Example: http://mysite.com/redirect.aspx?url=http//externalsite.com/their-page.asp
The target page on the external site (http//externalsite.com/their-
page.asp in this example) also redirects to another page (let's say
"their-page2.asp") on their website).
|
by: Sarah |
last post by:
I was wondering if someone might be able to help me with this issue.
I have a feeling this has something to do with my host's server
settings as I used to be able to get CURL to follow redirects by
setting CURLOPT_FOLLOWLOCATION set to true. I had a problem with my
host's updating something in the past that gave me the error
"CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an
open_basedir is set". My host worked on the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |