Niv,
If you've looking for a hover tool tip when the user moves over a control
though, this is different (and probably better) and all you need to do is
create a button control ( <asp:Button> not <input> ) and then in your code
behind change the button's "tooltip" property. If this is what you want,
ignore the rest, else read on...
If you're getting the data that you want to populated your "pop-up" with
from a dataset, then you should add the control attribute in this in the
aspx page (design time), but rather as code behind (run-time)...
///////////////////////////////////////////////////////// aspx page
<!-- put this within the <Head> tags... -->
<script type="text/javascript">
function func( stringToDisplay )
{
//you could put anything here, e.g. opening a window etc.
alert(stringToDisplay);
}
</script>
</Head>
<Body>
<!-- other HTML/ASPX code here -->
<INPUT id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<!-- etc... -->
///////////////////////////////////////////////////////// aspx.cs in the
Page_Load method.
string myString = "Testing";
myButton.Attributes["onmouseover"]= "func(" + myString + ");"
hope that helps...
Thanks.
Daniel.
"niv" <ni*@hotmail.com> wrote in message
news:9b****************************@phx.gbl...
Hi,
I have an asp.net button control on a webform.
I would like to show a drop down window when the user
moves their mouse over the button.
The information in this dropdown or popup is going to be
coming from a dataset.
I have tried the following.
<INPUT onmouseover="func()" id="myButton"
type="button" value="Button1" style="Z-INDEX: 102; LEFT:
200px; POSITION: absolute; TOP: 104px"
runat="server">
<script type="text/javascript">
function func()
{
//you could put anything here, e.g. opening a window etc.
alert('Hi');
}
myButton.Attributes["onmouseover"]=String.Format("func
({0})", "my text");
I am not getting the result Im looking for with this code.
I took this code from this newsgroup.
Thanks for your help,
niv