Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to: use SERVER controls to simulate HTML "link & button" rollo

Reply
Thread Tools

How to: use SERVER controls to simulate HTML "link & button" rollo

 
 
charliewest
Guest
Posts: n/a
 
      01-20-2005
I am trying use server controls or web controls to simulate the following
behavior. I've an image wrapped w/in a link to create a rollover effect as
if both elements we're one graphic:

<a href="javascript:submit();"
onMouseOver="MM_swapImage('Image1221','','images/btn_green_on.gif',1)"
onMouseOut="MM_swapImgRestore()" id="A1" runat="server"> Next <img
src="images/btn_green.gif" alt="Next" name="Image1221" width="16" height="16"
border="0" align="absMiddle" id="Image1"></a>

The advantage of the above code is that when developing for multilingual
sites, i don't need to create a new graphic button for each language, but can
instead change the text "Next" to whatever language. Additionally, when
moving the mouse over the link, the link's CSS style changes the color, and
at the same time, the mouseover event changes the corresponding button's
image, making a rollover effect - the link/button combination appears to be
"one graphic".

I'm trying to simulate this using web controls so that i can wire-up the
controls to specific events via code-behind. i've tried...

<asp:LinkButton id="LinkButton1" runat="server">Next</asp:LinkButton>
<asp:ImageButton id="ImageButton1" runat="server"
onmouseover="this.src='images/btn_green_on.gif';"
onmouseout="this.src='images/btn_green.gif';"
ImageUrl="images/btn_green.gif"></asp:ImageButton>

....however, i cannot manage to make the LinkButton execute onmouseover
events so that the ImageButton looks like it's been "rolled over".

Is there any way to do this?

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      01-20-2005
charliewest wrote:
> I am trying use server controls or web controls to simulate the

There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.

HTH,
Bob Barrows--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How do I simulate a rightclick on the html element Napoleon Javascript 2 11-21-2007 05:28 AM
HTML controls instead of .Net server controls =?Utf-8?B?Q2hyaXMgRGF2b2xp?= ASP .Net 3 09-16-2006 05:24 PM
Difference in Web server Controls and HTML Server Controls =?Utf-8?B?c2lhag==?= ASP .Net 7 03-07-2005 07:15 PM
HTML Server Controls vs Web Server Controls brian ASP .Net Web Controls 1 01-24-2005 05:13 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57