Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-16-2011, 06:21 AM #1
- Join Date
- Apr 2008
- Thanked 0 Times in 0 Posts
I have used the following code,
<asp:GridView ID="GridView1" runat="server">
<asp:CheckBox ID="chkboxBody" runat="server" />
I have replaced also the following script, but nothing works,
var getobj=document.getElementById("<%=Id.ClientID %>").value;
But 'Object required error occurred'
Please provide me a solution
thanks in advance,
Last edited by jmohan; 12-16-2011 at 06:24 AM.
12-16-2011, 03:37 PM #2
first a few things to try-
have you run debug and seen what values are?
set break point on the script call and in immediate window check value of the id being passed by the onclick function. Also I do not see any field value="something" so how can you target that id's value if it does not exist? But I think the more underlying problem is probably that <asp: objects "onclick" events target the code behind function... try OnClientClick="" ... i think there are probably a few things you will need to debug.
Edit: as a side note if you set the break points and are not using IE for default browser, I do not think visual studio will break on it- I have had problems w/ this in the past trying to us chrome as default browser. *the only reason IE is my default browser