Convert ASP page to ASPX

A

Andrew Hayes

Hi All,

I've been using a copy of PostAcpt.aspx that I found on the web to allow
users to upload files to a folder on a server, and it redirects them to
posted.asp when the upload is complete which has script to handle the virus
checking, but I would like it to redirect to an aspx page instead.

What's the best way to replicate the functionality of the VBScript code in
the ASP page as C# code in a ASPX page?

Regards...Andrew
 
D

Denny Boynton

Andrew,

Well, technically you can write C# code in-line in the ASPX page
itself, just like the VBScript in classic ASPs. But if you're looking
for the "best way" to do this, then it would be to place the code in
the code behind class for the ASPX page.

In fact, the C# code to redirect to your new ASPX page should look
pretty familiar to you:

Response.Redirect("SomePage.aspx"); or Server.Transfer("SomePage.aspx",
false);

I don't know how much ASP.NET development you've done. If this is too
general, reply and I can give you some more details.

Thanks,
Denny Boynton
 

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

Top