joe_pool_is Posted October 15, 2004 Posted October 15, 2004 How can I create a small, 1-page and 1-file ASP.NET project? I am trying to eliminate the "code behind" by placing my code in ASP tags <% %>. I put together a test page, uploaded it to the ISP, and attempted to load it in IE. I got a "no web.config file" error. I am sure there will be more errors I'll run into if I don't do it right. Could someone show me how to put together a small, simple page with one textbox that gets filled from the Response.QueryString command? There are bits and pieces of info all over the web, but I can't seem to find anything that puts it all together. For example: http://www.my-website.com/page.aspx?name=John%20Doe ...would load page.aspx with the name "John Doe" in the txtName.Text field. Doing this is either so simple it is baffling me, or it requires just as big of a project as any other ASP.NET application. Thanks for helping. ~Joe Quote Avoid Sears Home Improvement
HardCode Posted October 15, 2004 Posted October 15, 2004 Go to http://www.asp.net. It is a Microsoft website. Download the free ASP.NET IDE called Web Matrix. Create a new .ASPX page, and it will give you a section at the top <script runat="server"> </script>. Drop and drag a textbox on the web form. Back in the code, put in that script section: Sub Page_Load() TextBox1.Text = Response.QueryString("name") End Sub That should get you started! You can also run, within Web Matrix, the ASPX pages because it initiates a virtual web server for you :) . Quote
Moderators Robby Posted October 15, 2004 Moderators Posted October 15, 2004 You don't need Web Matrix to put in-line server tags in the aspx file, you can even do this in Notepad. Whatever tool you use you will still end up with a DLL once you compile it. Your page will not run without this DLL. Quote Visit...Bassic Software
joe_pool_is Posted October 15, 2004 Author Posted October 15, 2004 That was more helpful than you know! I actually downloaded Web Matrix some time back, but forgot about it. Thanks! I've got a new tool! :) Quote Avoid Sears Home Improvement
Moderators Robby Posted October 15, 2004 Moderators Posted October 15, 2004 If you already have VS.NET why would you use Web Matrix? Quote Visit...Bassic Software
joe_pool_is Posted October 15, 2004 Author Posted October 15, 2004 If you already have VS.NET why would you use Web Matrix?VS.NET wants a big, complex system with dll's and ... I can't for the life of me seem to get "code on page" (as opposed to "code behind") to work in the VS.NET debugger. I just want one page that is all inclusive, easy and simple. Why? The page, ultimately, will be given to our IT guys to generate an ASP (not ASP.NET) page, and they do not have VS.NET. With it all in one page, I can print out the HTML view, and let them edit it as needed to run their ASP, add their pretty graphics, etc. Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.