Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
get control of the form using name
Old 05-25-2010, 08:41 AM get control of the form using name
Experienced Talker

Posts: 37
Name: ahmad
Trades: 0
in the csharp 2005 we can get this control using this code
this.controls["btnstatic"]
but in the 2003 need index of this control
how i can solved this problem in 2003 not need to index need use name of control
BR
EngAhmad is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-03-2010, 04:54 PM Re: get control of the form using name
Extreme Talker

Posts: 246
Trades: 0
If you set it so that btnstatic is an asp.net control and set runat="server", you should be able to reference it by it's ID.

btnstatic.Text = "Button Text";
btnstatic.Eneabled = true;
...

Otherwise I think you can try FindControl
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to get control of the form using name
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23359 seconds with 12 queries