Dim ctrl as Control
For each ctrl in me.controls
If ctrl.ID.StartsWith("special_") Then
If Typeof ctrl is TextBox then
Ctype(ctrl,TextBox).Text=""
Else
If TypeOf ctrl is DropDownList Then
CType(ctrl,DropDownList).ClearSelection()
End If
End If
End If
Next
--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Charles" <CWil...@Bellsouth.net> wrote in message
news:0cac01c31f16$a9f23430$a001...@phx.gbl...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Charles Wildner" <cwil...@bellsouth.net> wrote in message
news:uWjfO9x...@tk2msftngp13.phx.gbl...
I'm getting
("Object reference not set to an instance of an object.")
on the "If ctrl.ID.StartsWith("txt") Then" line
and if I leave it out it only loops thru 3 times and then
stops. there are atleast 20+ controls on the ASP page
Charles
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
A watched clock never boils.
"Charles Wildner" <cwil...@bellsouth.net> wrote in message
news:eqkPsszH...@tk2msftngp13.phx.gbl...
"Charles Wildner" <cwil...@bellsouth.net> schreef in bericht
news:eqkPsszH...@tk2msftngp13.phx.gbl...
In case you need to convert other C# code to VB.NET, the following
converter should help in most cases:
http://www.kamalpatel.net/ConvertCSharp2VB.aspx
Hope this helps.
Regards,
Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: Charles Wildner <cwil...@bellsouth.net>
>References: <e#meGSzHD...@TK2MSFTNGP11.phx.gbl>
>X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
>Subject: Re: Convert some C# to VB.NET
>Mime-Version: 1.0
>Content-Type: text/plain; charset="us-ascii"
>Content-Transfer-Encoding: 7bit
>Message-ID: <eqkPsszH...@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>Date: Tue, 20 May 2003 18:49:08 -0700
>NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
>Lines: 1
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:146747
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet