A
Aamir Ghanchi
Hi, I am wondering why the <%= % is not working when I use it to pass
the clientid to a javascrip function from the aspx declaration code.
Say, I have a listbox webcontrol and from its client-side javascript
eventhandler attribute, I try to pass on the client id as follows
<asp:ListBox ID="myListBox"
runat="server"
onchange="lst_onchange('<
%=myListBox.ClientID%>')" >
</asp:ListBox>
In the javascript as follows it will not show the actual clientid, but
will pass on the whole paramater without evaluating it simply as <
%=myListBox.ClientID%>
function lst_onchange(lstBoxID){
alert(listboxID)
}
the clientid to a javascrip function from the aspx declaration code.
Say, I have a listbox webcontrol and from its client-side javascript
eventhandler attribute, I try to pass on the client id as follows
<asp:ListBox ID="myListBox"
runat="server"
onchange="lst_onchange('<
%=myListBox.ClientID%>')" >
</asp:ListBox>
In the javascript as follows it will not show the actual clientid, but
will pass on the whole paramater without evaluating it simply as <
%=myListBox.ClientID%>
function lst_onchange(lstBoxID){
alert(listboxID)
}