Click here to Skip to main content
15,122,406 members

Comments by Hitesh Gohel (Top 7 by date)

Hitesh Gohel 30-Aug-13 7:24am View
   
you'r welcome..
Hitesh Gohel 30-Aug-13 2:03am View
   
Hi Priyanka,
you are using Jquery then write this code in document.ready other wise in window.onload event.
Hitesh Gohel 30-Aug-13 2:01am View
   
Hi Priyanka,

Pls tell me what you get from this code document.getElementById("cmbTnDscode").value
if you get DsCode then this works else you get DsName then it not works..
Hitesh Gohel 29-Aug-13 6:46am View
   
Hi,
In your table fields Dwg_Ref,Title,[Status] which type of Data Type?
Hitesh Gohel 29-Aug-13 6:36am View
   
Hi Ravi,
please write your post event whole code so can give suggestion for that.
Hitesh Gohel 24-May-13 0:55am View
   
Hi..
Please try this if you didn't get..

<asp:DataList ID="LocationDataList" runat="server" RepeatColumns="5" RepeatDirection="Horizontal">
<HeaderTemplate>
<table width="150">
<tr>
<td width="10%">
</td>
</HeaderTemplate>
<itemtemplate>
<td width="80%">
<input id="chkName" name="LocatIDChkBox" runat="server" type="checkbox" value='<%#Eval("UserId") %>' clientidmode="Static" />
<asp:Label ID="LocatNamelbl" runat="server" Text='<%# Eval("UserName") %>'>
</td>

<footertemplate>
<td width="10%">
</td>
</tr> </table>
<td align="center" class="style1" colspan="5">
<asp:Button ID="SubmitBtn" runat="server" Text="Submit" Width="100px" OnClientClick="return CheckValid();" />
</td>





<script type="text/javascript"> var arIntIds = new Array();
var counter = 1;
$(function () {
$("input[id^='chkName']").change(function () { CheckUnCheckAll(this); });
});
function CheckUnCheckAll(chk) {
if ($(chk).is(':checked')) {
PushToIntIds(counter);
}
else {
PullFromIntIds(counter);
}
}

function PushToIntIds(counter) {
arIntIds.push(counter);
alert("Selected Checkbox Count : " + arIntIds.length);
}

function PullFromIntIds(counter) {
arIntIds.pop(counter);
alert("Selected Checkbox Count : " + arIntIds.length);
}

function CheckValid() {
if (arIntIds.length >= 10) {
alert("You can not select more then 10 checkbox!!");
return;
}
else {
alert('Move on ..');
}
}</script>
Hitesh Gohel 23-May-13 10:37am View
   
Hi,
you just add the function CheckValid() in your code on

<asp:Button ID="SubmitBtn" runat="server" Text="Submit" Width="100px" onclick="SubmitBtn_Click" Visible="False" /> this button as OnClientClick="return CheckValid();"

and add checkbox field id also..