Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Redirection Error

Author  Topic 

ninel
Posting Yak Master

141 Posts

Posted - 2006-05-23 : 17:16:02
I am trying to redirect to another page within my aspx page.

Here is my code:

Response.Redirect("IncidentReviewDetailUpdate.aspx?CommentHistoryId=1&IncidentId=2&IncidentType=DATA &Status=OPEN")


I'm getting a "Redirect URI cannot contain newline characters." error.

I don't see anything wrong with the url.

Can anyone help?
Thanks,
Ninel

MichaelP
Jedi Yak

2489 Posts

Posted - 2006-05-23 : 17:42:24
Looks like there's a space after the word data. That space could be a carridge return, line feed, or both.

Do some reading on URLEncode(). I forget what namespace it is in, but I think that's going to help you in this case.

Michael

<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda>

Opinions expressed in this post are not necessarily those of TeleVox Software, inc. All information is provided "AS IS" with no warranties and confers no rights.
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2006-05-23 : 19:14:22
Have you tried replacing this.
Response.Redirect("IncidentReviewDetailUpdate.aspx?CommentHistoryId=1&IncidentId=2&IncidentType=DATA &Status=OPEN")

Wit this...?
Response.Redirect("IncidentReviewDetailUpdate.aspx?CommentHistoryId=1&IncidentId=2&IncidentType=DATA&Status=OPEN")


Or are you generating your querystring on the fly?





JBelthoff
D
odge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
Asp Hoting Provider
Go to Top of Page

ninel
Posting Yak Master

141 Posts

Posted - 2006-05-24 : 08:24:52
I am generating the querystring with variables. I just displayed the data so that you can see it. I can try trimming all the variables before redirect.

Thanks,
Ninel
Go to Top of Page

JBelthoff
Posting Yak Master

173 Posts

Posted - 2006-05-24 : 13:33:51
Sounds like you are adding a "newline" somewhere.

Find out where and you should have this fixed.



JBelthoff
D
odge, Duck, Dip, Dive & Dodge
If a man can dodge a wrench, he can dodge a ball!
Asp Hoting Provider
Go to Top of Page

ninel
Posting Yak Master

141 Posts

Posted - 2006-05-25 : 09:30:08
I trimmed all the variables and looks like it works now.

Thanks for all your help.
Go to Top of Page
   

- Advertisement -