How do u do MouseOver in Microsoft VS using ASP.net?
Hi Guys, its me again.
Cos i m using the WebControl to load the image then i drag over to WebForm.
so i have been thinking...how do i make MouseOver with the images.
so the idea is i:
1) Create a WebControl (ext is .ascx)
2) Drag the WebControl over the table i created.
3) ** How u make a MouseOver? **
So hope u guys could help me out....
Same for everytime....i m urgent here...lolz...
You dont. Mouse over would be a client side event handler and cannot be done server side. You must understand, in order for any server side script to fire, the page has to be resent to the server. The best way to do this is through the click of a button.
Could u explain it more in details? pls. thanks
Ok so i do it in client side,right. but when i use ASP.net to run it, it wont give me the MouseOver. Probably it bcos the HTML doesnt work as in asp.net....hmmm wait i dont understand wat m i saying...lolz
This is using client side MouseOver,right?
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Quick Reservation','','../../../../Inetpub/wwwroot/HotelReservation/Images/QuickReservationIn.jpg',1)">
name="Quick Reservation" width="150" height="100" border="0"></a>
Then this is from Microsoft VS insert image which dont have the MouseOver.
<asp:Image id="Image1" ImageUrl="file:///C:\Inetpub\wwwroot\HotelReservation\Images\QuickReservationOut.jpg" runat="server"></asp:Image>
i realise over client side the URL src is :../../../../Inetpub/wwwroot/HotelReservation/Images/QuickReservationOut.jpg
then over VS the URL src is:
the front slash and back slash....
So over the VS, i cant probably jus change the lines to mouseOver, isnt it?
So could u tell me pls wat is the code or syntax to have a MouseOver in ASP.net...thanks.
I will glad if u could help me...thanks.
Last edited by [z]`KoLd; 08-12-2004 at 02:23 AM.
There is no mouse over in asp.net. The only mouse over is in java script. You cannot have java script and asp.net communicate. The reason they will not be able to communicate is because the java script runs at the browser and the asp.net at the server. So basically forget about mouseover because there is no way to do it. The only way to run a server side script is if the page is posted back to the server, the most common example is when you click the submit button on a form, the server fires the form action code and you are redirect and the server grabs up all the form values on the page. This is post back. Therefore you cannot have effects like mouse over because the page would have to refresh to execute the code.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)