ASP.NET 1.0 and 1.1 BasicsASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I have been wracking my brain for what seems like DAYS now trying to find a way to do this.
My company uses another companies webmail product to serve our customers email and we need to make a small feature upgrade and the company who created it is asking a price we just don't see as reality because it is maybe 15 lines of code tops(Let's just say it's about $100 a line).
It is ASP.NET files Written in C#. I am an ASP only guy because I am really new to programming.
Is there any way to incorporate some ASP style code into this or could someone covert my code so I can just pop it into the pages. I cannot access the code view of these files.
Here's the code as it would be written in ASP(All I know.):
<%
' This section goes on the login page and only acts when
' it sees the mte querystring. The data querystring is
' a string that will come across like
' "mailto:someguy@someisp.com" minus the quotes.
If Request.Querystring("mte") <> "" then
startOf = InStr(Request.QueryString("data"), ":") + 1
strData = MID(Request.QueryString("data"), startOf)
Session("mte") = Request.QueryString("mte")
Session("data") = strData
end If %>
<%
' This section goes on the first page once they login.
If Session("mte") <> "" then
Response.Redirect("http://www.someisp.com/webmail/newmessage.aspx")
End If %>
<%
' This section goes on the new message editor where a value of TO:
' would go.
If Session("mte") <> "" then
Response.Write(Session("data"))
End If
%>
If you cannot access the "code view" of the files how do you expect to be able to add in whatever it is you want to have added in? (I'm not sure what you mean by "code view", do you mean you don't have the component source code?)
If what you intend to do is to add the ASP style code into the ASPX file, you can put almost exactly what you have written write where you want to. The only thing you'll need to do is add an imports statement to the top of the ASPX file so that the visual basic functions you are using are in scope:
<%@ Imports Microsoft.VisualBasic %>
I think that's what you'll need. I use the codebehind model so I'm not used to putting imports statements in my aspx files.