Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 20th, 2007, 6:14 PM   #1
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Onclick

I am not used to programming in ASP.net, i am mainly a C# / Java person, can you explain to me this:

I have a label.. and I want to do something when it is clicked.... ie show another label... i tried this to no avail:

<span><span style="color: activecaption" onclick="<%bestOffer_help.Visible=true;%>">what's this
?</span>&nbsp;<br />


but the label that i want to show was visible as soon as I loaded the page, even though I had visible set to false for it.... none the less... how can i click on a label or text and get it to do something when i click on it

ps: im doing this in ASP.net with c#


many thanks
paulchwd is offline   Reply With Quote
Old Feb 13th, 2008, 9:50 AM   #2
itgalary
Newbie
 
itgalary's Avatar
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 itgalary is on a distinguished road
Re: Onclick

ASP.net IDE will add all the required code by itself isn't?

Just add a label and double click on it
__________________
Free Programming help http://www.itgalary.com
Free Revenue Sharing http://blog.itgalary.com
Online Site seeing http://www.itgalary.com/maps/
itgalary is offline   Reply With Quote
Old Feb 13th, 2008, 12:48 PM   #3
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 371
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Re: Onclick

How often do you see a site where you can just click " some text " and it does stuff ? Asp.Net is not WinForms, it still relies on the old html on the client side. If you want an onclick event , use an <asp:Button or <asp:LinkButton or <asp:HyperLink .

If you want to do it on the client, you can always use JavaScript.

Do take a look at a tutorial on asp.net before asking questions like this.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OnClick HElP paulchwd ASP 2 Nov 15th, 2005 5:03 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:37 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC