trying a request ?

D

Daniel Groh

Hi,
I have to pages: withForms.aspx and withoutForms.aspx
In the withForms.aspx i have a Session.Transfer to withoutForms.aspx that
get the data and insert in my database and do somethings else.
BUT, if someone type in the URL bar: http://mysite/withoutForms.aspx without
passing by withForms.aspx should redirect to withForms.aspx.

I'm using in the page_load of withoutForms this code:

if(Request.ContentType!=""){ //withour any contents sent
Response.Redirect("withForms.aspx");
}else{
all my code here
}

I just would like to know if that's the best way because i don't wanna use
if(Request.ServerVariable["HTTP_REFERER"]!="wirhForms.aspx"){ my
action; } --that's so much letters...hehehe

Thanks in advance,



--

Atenciosamente,

Daniel Groh
CTF Technologies do Brasil Ltda.
Analista Programador
Fone: 11 3837-4203
E-mail: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top