.NETGURU
Instead of Response.Redirect I'm getting HTML returned
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngescalate' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Phil Winstanley
I tried to ask this on [aspngfreeforall] and the moderators private lists
and got no working answer (one answer in total). Now I need to get this
answered because the other lists are not providing me with valid answers.

This in an intermittent error - id say 80% of the time its occurring.

I'm calling Response.Redirect in a sub as so

Sub NextPage(sender As Object, e As System.EventArgs)
Dim dNo, dQstring, myArray, selecteddate, n, myqstring, myURL
If NOT Session("dateArray") Is Nothing Then
n &# 1;
myArray &# S;ession("dateArray")
for each selecteddate in
myArray
dQstring &# d;Qstring
& ("&date" & n & "&#" ;& UrlEncode(selecteddate))

n &# n; + 1
next
dNo &# n;
myURL "http://intranet/AttendanceLeave/main/interface/attendance/booking/holder.as
p?datenumber&#" ;& dNo & dQstring

Redirect(myUrl)
End IF
End Sub

Sub Redirect(myURL)
Response.Redirect(myURL)
Response.End
End Sub

But instead of redirecting me its giving me the following HTML !!! *CRY*

<BODY><ASP_SMARTNAV_RDIR
url&#"h;ttp://intranet/AttendanceLeave/main/interface/attendance/booking/holde
r.asp?datenumber&;date1+August+2001&date2+August+2001&date3+August
+2001&date4+August+2001&date5+August+2001"></ASP_SMARTNAV_RDIR></BODY>

I'm running ASP.NET Premium which has been installed on a Win2000 Server
Machine that previously had beta 1 installed on it - which was uninstalled.

I have asked someone else to run this code for me and they have been unable
to reproduce the error.

I have tried reinstalling ASP.NET on the Server, having the redirect in the
same sub, redirecting to a different page, nothing so far has worked for me.

The only suggestion I have been given is to delete all the temp ASP files @

\WINNT\Microsoft.NET\Framework\v1.0.2914\Tempoary ASP.NET Files\

And clean out the bin in the project - done both nothings changed.

Anyone Got Any Ideas?

___________________________________________
Phil Winstanley
MIS Database Support
Software Creations (Holdings) Ltd
"A Computer Games Developer with Balls!"
140 Cheetham Hill Road
Manchester
M8 8PZ
England
Tel: +44(0)161 839 2239
fax: +44(0)161 832 0412
___________________________________________
ICQ: 29163700
http://www.creations.co.uk/
Click here to reveal e-mail address
"At what point did you seem to forget WE ARE TRYING TO TAKE OVER THE WORLD!"
Reply to this message...
 
    
Saurabh Nandu (VIP)
I am not a VB pro but isn't VB.NET case sensitive??
Try . (I haven't tired it although ..)

Sub NextPage(sender As Object, e As System.EventArgs)
Dim dNo, dQstring, myArray, selecteddate, n, myqstring, myURL
If NOT Session("dateArray") Is Nothing Then
n &# 1;
myArray &# S;ession("dateArray")
for each selecteddate in
myArray
dQstring dQstring & ("&date" & n & "&#" ;& UrlEncode(selecteddate))
n &# n; + 1
next
dNo &# n;
myURL "http://intranet/AttendanceLeave/main/interface/attendance/booking/holde
r.asp?datenumber&#" ;& dNo & dQstring
Response.Redirect(myURL)
'Changed somethings here
End IF
End Sub
Sub Redirect(myURL)
Response.Redirect(myURL)
Response.End
End Sub

Regards,
Saurabh Nandu
Technical Evangelist
YesSoftware India <http://www.yessoftware.com/>
Web Master: http://www.MasterCSharp.com <http://www.mastercsharp.com/>
Master C#, the easy way...

-----Original Message-----
From: Phil Winstanley [mailto:Click here to reveal e-mail address]
Sent: Friday, August 24, 2001 6:36 PM
To: aspngescalate
Subject: [aspngescalate] Instead of Response.Redirect I'm getting HTML
returned

I tried to ask this on [aspngfreeforall] and the moderators private
lists and got no working answer (one answer in total). Now I need to get
this answered because the other lists are not providing me with valid
answers.
This in an intermittent error - id say 80% of the time its occurring.
I'm calling Response.Redirect in a sub as so
Sub NextPage(sender As Object, e As System.EventArgs)
Dim dNo, dQstring, myArray, selecteddate, n, myqstring, myURL
If NOT Session("dateArray") Is Nothing Then
n &# 1;
myArray &# S;ession("dateArray")
for each selecteddate in
myArray
dQstring dQstring & ("&date" & n & "&#" ;& UrlEncode(selecteddate))
n &# n; + 1
next
dNo &# n;
myURL "http://intranet/AttendanceLeave/main/interface/attendance/booking/holde
r.asp?datenumber&#" ;& dNo & dQstring
Redirect(myUrl)
End IF
End Sub
Sub Redirect(myURL)
Response.Redirect(myURL)
Response.End
End Sub
But instead of redirecting me its giving me the following HTML !!! *CRY*

<BODY><ASP_SMARTNAV_RDIR
url&#"h;ttp://intranet/AttendanceLeave/main/interface/attendance/booking/h
older.asp?datenumber=6
<http://intranet/AttendanceLeave/main/interface/attendance/booking/holde
r.asp?datenumber&;date1+August+2001&date2+August+2001&date3+Au
gust+2001&date4+August+2001&date5+August+2001>
&date1+August+2001&date2+August+2001&date3+August+2001&date4
+August+2001&date5+August+2001"></ASP_SMARTNAV_RDIR></BODY>
I'm running ASP.NET Premium which has been installed on a Win2000 Server
Machine that previously had beta 1 installed on it - which was
uninstalled.
I have asked someone else to run this code for me and they have been
unable to reproduce the error.
I have tried reinstalling ASP.NET on the Server, having the redirect in
the same sub, redirecting to a different page, nothing so far has worked
for me.
The only suggestion I have been given is to delete all the temp ASP
files @
\WINNT\Microsoft.NET\Framework\v1.0.2914\Tempoary ASP.NET Files\
And clean out the bin in the project - done both nothings changed.
Anyone Got Any Ideas?
___________________________________________
Phil Winstanley
MIS Database Support
Software Creations (Holdings) Ltd
"A Computer Games Developer with Balls!"
140 Cheetham Hill Road
Manchester
M8 8PZ
England
Tel: +44(0)161 839 2239
fax: +44(0)161 832 0412
___________________________________________
ICQ: 29163700
<http://www.creations.co.uk/> http://www.creations.co.uk/
Click here to reveal e-mail address
"At what point did you seem to forget WE ARE TRYING TO TAKE OVER THE
WORLD!"
Reply to this message...
 
    
Tim
Instead of Response.Redirect I'm getting HTML returnedWhy would you create a wrapper for the response object?

Have you tried in your function just using Response.Redirect(myUrl) rather than calling a function that does that? Your function executes and End before the function even completes and that could be the problem.

Tim
"Phil Winstanley" <Click here to reveal e-mail address> wrote in message news:467475@aspngescalate...

I tried to ask this on [aspngfreeforall] and the moderators private lists and got no working answer (one answer in total). Now I need to get this answered because the other lists are not providing me with valid answers.

This in an intermittent error - id say 80% of the time its occurring.

I'm calling Response.Redirect in a sub as so

Sub NextPage(sender As Object, e As System.EventArgs)
Dim dNo, dQstring, myArray, selecteddate, n, myqstring, myURL
If NOT Session("dateArray") Is Nothing Then
n = 1
myArray = Session("dateArray")
for each selecteddate in myArray
dQstring = dQstring & ("&date" & n & "=" & UrlEncode(selecteddate))

n = n + 1
next
dNo = n
myURL = "http://intranet/AttendanceLeave/main/interface/attendance/booking/holder.asp?datenumber="; & dNo & dQstring

Redirect(myUrl)
End IF
End Sub

Sub Redirect(myURL)
Response.Redirect(myURL)
Response.End
End Sub

But instead of redirecting me its giving me the following HTML !!! *CRY*

<BODY><ASP_SMARTNAV_RDIR url="http://intranet/AttendanceLeave/main/interface/attendance/booking/holder.asp?datenumber=6&date1=27+August+2001&date2=28+August+2001&date3=29+August+2001&date4=30+August+2001&date5=31+August+2001"></ASP_SMARTNAV_RDIR></BODY>

I'm running ASP.NET Premium which has been installed on a Win2000 Server Machine that previously had beta 1 installed on it - which was uninstalled.

I have asked someone else to run this code for me and they have been unable to reproduce the error.

I have tried reinstalling ASP.NET on the Server, having the redirect in the same sub, redirecting to a different page, nothing so far has worked for me.

The only suggestion I have been given is to delete all the temp ASP files @

\WINNT\Microsoft.NET\Framework\v1.0.2914\Tempoary ASP.NET Files\

And clean out the bin in the project - done both nothings changed.

Anyone Got Any Ideas?

___________________________________________
Phil Winstanley
MIS Database Support
Software Creations (Holdings) Ltd
"A Computer Games Developer with Balls!"
140 Cheetham Hill Road
Manchester
M8 8PZ
England
Tel: +44(0)161 839 2239
fax: +44(0)161 832 0412
___________________________________________
ICQ: 29163700
http://www.creations.co.uk/
Click here to reveal e-mail address
"At what point did you seem to forget WE ARE TRYING TO TAKE OVER THE WORLD!"
Reply to this message...
 
    
Peter Brunone (VIP)

VB has never been, and probably never will be, case sensitive. The only
time case matters is in string comparisons if you haven't told it otherwise.

Phil,

Didn't MS say you had to wipe and reinstall Windows if you were going
from Beta1 to Beta2? This may be part of your problem. Also, what
namespaces did you import for this file?

----- Original Message -----
From: "Saurabh Nandu" <Click here to reveal e-mail address>
To: "aspngescalate" <Click here to reveal e-mail address>
Sent: Friday, August 24, 2001 9:54 AM
Subject: [aspngescalate] RE: Instead of Response.Redirect I'm getting HTML
returned

| I am not a VB pro but isn't VB.NET case sensitive??
| Try . (I haven't tired it although ..)
|
| Sub NextPage(sender As Object, e As System.EventArgs)
| Dim dNo, dQstring, myArray, selecteddate, n, myqstring, myURL
| If NOT Session("dateArray") Is Nothing Then
| n = 1
| myArray = Session("dateArray")
| for each selecteddate in
| myArray
| dQstring =
| dQstring & ("&date" & n & "=" & UrlEncode(selecteddate))
| n = n + 1
| next
| dNo = n
| myURL =
| "http://intranet/AttendanceLeave/main/interface/attendance/booking/holde
| r.asp?datenumber=" & dNo & dQstring
| Response.Redirect(myURL)
| 'Changed somethings here
| End IF
| End Sub
| Sub Redirect(myURL)
| Response.Redirect(myURL)
| Response.End
| End Sub
|
|
| Regards,
| Saurabh Nandu
| Technical Evangelist
| YesSoftware India <http://www.yessoftware.com/>
| Web Master: http://www.MasterCSharp.com <http://www.mastercsharp.com/>
| Master C#, the easy way...

Reply to this message...
 
    
Phani Katakam
(Type your message here)

--------------------------------
From: Phani Katakam
I got this kind of problem recently... I had an image button, on click I am submitting to the server, based on some condition I am redirecting to the page...see that Your Page does not post twice by one single click...I mean, u keep return false in the click of initiating button.
Try it out !
Reply to this message...
 
 
System.EventArgs




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification