Attn: Carl Prothman [MVP]

  • Thread starter Thread starter scriptsDel
  • Start date Start date
S

scriptsDel

Carl, i know this is the ASP.NET newsgroup, I did a copy
paste of my exisitng ASP code to make sure the problem is
understood correctly.. i am migratng my existing ASP
applications and i need help on the migration -- i mean an
optimized approach where i will be using the new features
of ASP.NET...

Subject: Re: Script
From: "Carl Prothman [MVP]" <[email protected]> Sent:
8/13/2003 11:40:30 AM




ScriptDelm said:
Thanks for the info,..actually what i am trying to is i
have a ASP application

Note this is the ASP.NET newsgroup. If you are using ASP,
then please ask your questions in the ASP newsgroup.
microsoft.public.inetserver.asp.general
which has the the code as listed
below and i was trying to do a smiliar thing and i am
getting an error.... CS0117

<%if ucase(Request("Add"))="TRUE" then %>

If UCase(Request.Form("Add")) = "TRUE" Then

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
scriptsDel said:
Carl, i know this is the ASP.NET newsgroup, I did a copy
paste of my exisitng ASP code to make sure the problem is
understood correctly.. i am migratng my existing ASP
applications and i need help on the migration -- i mean an
optimized approach where i will be using the new features
of ASP.NET...
Subject: Re: Script
From: "Carl Prothman [MVP]" <[email protected]> Sent:
8/13/2003 11:40:30 AM

Note this is the ASP.NET newsgroup. If you are using ASP,
then please ask your questions in the ASP newsgroup.
microsoft.public.inetserver.asp.general

Ahhh, sorry! I missed the fact you were migrating to ASP.NET.
No worries... ;-)
If UCase(Request.Form("Add")) = "TRUE" Then

In ASP.NET, you just use the control's ID value to get or set it's properties.
You no longer have to use the Request.Form to get the control's value.

For example, if you place a Button and a TextBox on a WinForm, then
double click on the Button, you will be taken to the button's clieck event
in the WinForm's code-behind page (assuming you are using Visual Studo
..NET).

Since the button click event fires, you know which button on the form was
click. Plus you can set or get the value of the textbox as follows:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Set the value for TextBox1
TextBox1.Text = "Hello World"

' Get the value from TextBox1
Dim s As String = TextBox1.Text
End Sub

For more info / examples, see
http://samples.gotdotnet.com/quickstart/aspplus/

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
ScriptsDeml said:
Thanks Carl for the suggestion.. one more thing i want to
clarify is i was using #include files a lot ... how can i
replace them ??

You can still use include files. But the ASP.NET way is to
use User Controls
http://samples.gotdotnet.com/quickstart/aspplus/doc/webpagelets.aspx
or Custom Controls
http://samples.gotdotnet.com/quickstart/aspplus/doc/webctrlauthoring.aspx

You might also want to take a look a one of the presentations I did:
"Migrating Existing ASP Applications to ASP.NETAn in-depth look at the
paradigm shifts and upgrade strategies". The questions are you asking are
the exact "paradigm shifts" you need to make when moving to ASP.NET
http://www.able-consulting.com/dotnet/aspnet/asp_aspnet_files/frame.htm

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP
http://www.able-consulting.com
 
Back
Top