G
Guest
I have the below code which authenticates a user to view a PDF. Username and
Password are submitted through the querystring and then checked server-side.
Upon correct username password, the ASP page will stream the PDF, otherwise,
a sorry message will appear.
<%
Response.ContentType = "application/x-pdf"
Dim strURL
If Request.QueryString("username")="todd" And
Request.QueryString("password")="smith" Then
Response.Redirect "http://intranews/norights.pdf"
Else
Response.Redirect "http://intranews/newpaper1023.pdf"
End If
%>
How would this be coded in ASP.NET (with C# or VB.NET behind code)?
Thank you in advance.
-Jess
Password are submitted through the querystring and then checked server-side.
Upon correct username password, the ASP page will stream the PDF, otherwise,
a sorry message will appear.
<%
Response.ContentType = "application/x-pdf"
Dim strURL
If Request.QueryString("username")="todd" And
Request.QueryString("password")="smith" Then
Response.Redirect "http://intranews/norights.pdf"
Else
Response.Redirect "http://intranews/newpaper1023.pdf"
End If
%>
How would this be coded in ASP.NET (with C# or VB.NET behind code)?
Thank you in advance.
-Jess