"scriptsDel" <(E-Mail Removed)> wrote
> 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]" <(E-Mail Removed)> Sent:
> 8/13/2003 11:40:30 AM
> "ScriptDelm" <(E-Mail Removed)> wrote
> > 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
>
Ahhh, sorry! I missed the fact you were migrating to ASP.NET.
No worries... ;-)
> > 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
>
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