jQuery Uncaught Reference error: ClickInfo() is not defined - c#

I am getting an error Uncaught Reference error: ClickInfo() is not defined. I included the required JS source files in the project library.
I am not sure whats wrong in the code...
<div id="dvRegion" runat="server">
<h3> <a href="#" id="InfoExpand" onclick="return ClickInfo()">
<img src="../Styles/img/PlusCircle.png" id="InfoToggle" /></a>
<asp:Label ID="Label1" runat="server" Text="Info:" /></h3>
<div id="dvInfoRegion">
<table>
<tr>
<td>
<h5> <asp:Label ID="l1" runat="server" Text="a" /></h5>
</td>
<td>
<h6>
<div runat="server" id="dv1">
</div>
</h6>
</td>
</tr>
<tr>
<td>
<h5> <asp:Label ID="l2" runat="server" Text="b" /></h5>
</td>
<td>
<h6>
<div runat="server" id="dv2">
</div>
</h6>
</td>
</tr>
<tr>
<td>
<h5> <asp:Label ID="l3" runat="server" Text="c" /></h5>
</td>
<td>
<h6>
<div runat="server" id="dv3">
</div>
</h6>
</td>
</tr>
</table>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#dvInfoRegion").hide();
ClickInfo();
});
function ClickInfo() {
toggleRegion($("#dvInfoRegion"), $("#InfoToggle"));
return false;
}
function toggleRegion(region, toggle) {
if (region.is(":visible")) {
region.slideUp();
toggle.attr("src", "../Styles/img/PlusCircle.png");
}
else {
region.slideDown();
toggle.attr("src", "../Styles/img/MinusCircle.png");
}
}
can someone please, have a look at the code and tell me whats wrong? Thanks!

Try event handling and see if this works. It's better syntactically than to write inline javascript.
Remove the onclick attribute from the anchor link
<a href="#" id="InfoExpand">
<img src="../Styles/img/PlusCircle.png" id="InfoToggle" />
</a>
and
$(document).ready(function () {
$("#dvInfoRegion").hide();
ClickInfo();
$('#InfoExpand ').click(function() {
ClickInfo();
});
});

Related

Update Progress is not working inside Html Table in Asp.Net

Here is my code my update progress is not wokring inside Html Table.
Means My requirement is on button click preloader should be visible stating that please wait.
But here my update progress is visible witouht button click
what should be the issue
am i doing something wrong.
I have tried lots of different thing.
I have read lots of articles regarding this many people have told that update panel is not compatible with table is that right?
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<table style="width: 920px;" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
Skin Condition Type :
</div>
</td>
</tr>
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
Intro Text :
</div>
</td>
</tr>
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
Reason :
</div>
</td>
<td style="width: 700px;">
<div class="editor_posi">
<cc1:Editor ID="editor_reason" Width="650px" Height="200px" runat="server" />
</div>
</td>
</tr>
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
Treatment :
</div>
</td>
<td style="width: 700px;">
<div class="editor_posi">
<cc1:Editor ID="editor_treatment" Width="650px" Height="200px" runat="server" />
</div>
</td>
</tr>
<%--<tr>
<td style="width: 200px;" valign = "top">
<div class ="admin_txt">
FAQs :
</div>
</td>
<td style="width: 700px;">
<div class = "editor_posi">
<cc1:Editor ID="editor_faq" Width="650px" Height="200px" runat="server"/>
</div>
</td>
</tr>--%>
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
Treatment Recommendation:
</div>
</td>
<td style="width: 700px;">
<div class="editor_posi admin_txt_recm">
<asp:CheckBoxList ID="treatment_cbl" runat="server">
</asp:CheckBoxList>
</div>
</td>
</tr>
<tr>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel2" runat="server">
<ProgressTemplate>
<div>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
</div>
</td>
<td style="width: 700px;">
<div class="editor_posi">
<div class="img_cls">
<img src="images/spinner-mini.gif" />
</div>
<div class="msg_cls">
Please Wait...
</div>
</div>
</td>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</tr>
<asp:Panel ID="msg_pnl" runat="server">
<tr>
<td style="width: 200px;" valign="top">
<div class="admin_txt">
</div>
</td>
<td style="width: 700px;">
<div class="editor_posi">
<div class="img_cls">
<img src="images/check.png" />
</div>
<div class="msg_cls">
Your Record Has Been Submitted Successfully.
</div>
</div>
</td>
</tr>
</asp:Panel>
<tr>
<td style="width: 200px;" valign="top"></td>
<td style="width: 700px;">
<div class="editor_posi">
<span class="cmd_posi">
<asp:ImageButton ID="submit_btn" ImageUrl="~/images/button/submit_btn.jpg"
runat="server" OnClick="submit_btn_Click" />
</span>
<span class="cmd_posi">
<asp:ImageButton ID="reset_btn" ImageUrl="~/images/button/reset_btn.jpg"
runat="server" OnClick="reset_btn_Click" />
</span>
</div>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Any help will be appreciated.

Unable to hide and show text boxes after refresh the page

I am trying to hide and show text boxes by radio button using jquery. I can show and hide text boxes but the error is I have a drop-down list. When I select drop-down value the page getting refreshed. After page refresh I am unable to do hiding and showing of text boxes. I have update panel for ajax. Why I am unable to hide and show text boxes after page refresh? Here is my source code. Please help me.
<%# Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="ExperienceADD.aspx.cs" Inherits="Manjilas.WebForm31"%>
<%# Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" tagPrefix="ajax" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<head>
<script src="Scripts2/jquery-1.7-vsdoc.js"></script>
<script src="Scripts2/jquery-1.7.js"></script>
<script src="Scripts2/jquery-1.7.min.js"></script>
<script type="text/javascript">
$(function () {
$('input[name="type"]').on('click', function () {
if ($(this).val() == 'Experienced') {
$('#txtcomp').Show();
$('#txtfrom').Show();
$('#txtto').Show();
} else {
$('#txtcomp').hide();
$('#txtcomp').hide();
$('#txtfrom').hide();
$('#txtto').hide();
}
});
});
</script>
</head>
<div class="container-fluid">
<div class="row-fluid">
<div class="well span5 center login-box">
<div class="alert alert-info">
<b><font size="4">ADD EXPERIENCE DETAILS</font></b>
</div>
<form id="form1" runat="server">
<asp:UpdatePanel ID="updatepanel1" runat="server"><ContentTemplate>
<div>
<ajaxToolkit:ToolkitScriptManager runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:UpdatePanel ID="updatepanel2" runat="server"></asp:UpdatePanel>
<fieldset>
<table class="ui-accordion">
<tr>
<td align="left" class="style2">
MachID</td>
<td align="left">
<%-- <div class="input-prepend" title="Select Country Name">--%>
<asp:DropDownList ID="ddid" runat="server" AutoPostBack="True"
onselectedindexchanged="ddid_SelectedIndexChanged">
</asp:DropDownList>
</td>
</tr>
<tr>
<td align="left" class="style2">
<asp:Label ID="Empcode" runat="server" Text="EmpCode"></asp:Label>
<td align="left">
<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td align="left" class="style2">
</td>
<td align="left">
<input type="radio" name="type" value="Fresher" />Fresher
<input type="radio" name="type" value="Experienced" />Experienced
</td>
</tr>
<tr>
<td align="left" class="style2">
Company</td>
<td align="left">
<div class="input-prepend" title="Autogenerated District ID" data-rel="tooltip">
<asp:TextBox ID="txtcomp" runat="server" TextMode="SingleLine"></asp:TextBox>
</td>
</tr>
<tr>
<td align="left" class="style2">
From Date</td>
<td align="left">
<div class="input-prepend" title="Enter District Name" data-rel="tooltip">
<asp:TextBox ID="txtfrom" runat="server" TextMode="SingleLine"></asp:TextBox>
<ajax:CalendarExtender ID="Calendarextender1" TargetControlID ="txtfrom" Format="dd/MM/yyyy" runat="server"></ajax:CalendarExtender>
</td>
</tr>
<tr>
<td align="left" class="style2">
To Date</td>
<td align="left">
<div class="input-prepend" title="Enter District Name" data-rel="tooltip">
<asp:TextBox ID="txtto" runat="server" TextMode="SingleLine"></asp:TextBox>
<ajax:CalendarExtender ID="Calendarextender2" TargetControlID ="txtto" Format="dd/MM/yyyy" runat="server"></ajax:CalendarExtender>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td align="left">
<asp:Button ID="Button1" class="btn-primary" runat="server" Text="Add"
Height="36px" Width="74px" onclick="Button1_Click" />
<asp:Button ID="Button2" class="btn-primary" runat="server" Text="Cancel"
Height="36px" Width="74px" PostBackUrl="~/districtDetails.aspx" />
</td>
</tr>
<tr>
<td class="style2">
</td>
<td align="left">
<asp:Label ID="Label2" runat="server" ForeColor="Red"></asp:Label>
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</fieldset>
</form>
</div><!--/span-->
</div><!--/row-->
</div>
</div>
</asp:Content>
It's because you're using an UpdatePanel, it will refresh everything inside it's <ContentTemplate>, which in your case has input[name="type"] inside it.
Because it's refreshed, the on('click', function() { isn't binding the current radiobutton with the name="type" anymore, thus make the click never triggered after you select one item inside the dropdown, what you need is to wrap the UpdatePanel only for things that you want to be refreshed or changed only, like this for your case:
<asp:UpdatePanel ID="updatepanel1" runat="server">
<ContentTemplate>
<tr>
<td align="left" class="style2">
MachID
</td>
<td align="left">
<asp:DropDownList ID="ddid" runat="server" AutoPostBack="True"
onselectedindexchanged="ddid_SelectedIndexChanged">
</asp:DropDownList>
</td>
</tr>
<tr>
<td align="left" class="style2">
<asp:Label ID="Empcode" runat="server" Text="EmpCode"></asp:Label>
</td>
<td align="left">
<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
</td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
Other Way
Use the jQuery on click selector, you just need to change
$('input[name="type"]').on('click', function () {
if ($(this).val() == 'Experienced') {
$('#txtcomp').show();
$('#txtfrom').show();
$('#txtto').show();
}
too
$('.ui-accordion').on('click', 'input[name="type"]', function () {
if ($(this).val() == 'Experienced') {
$('#txtcomp').show();
$('#txtfrom').show();
$('#txtto').show();
}
The show function is k senstive. Try this:
$('#txtcomp,#txtfrom,#txtto').show();

asp:LinkButton - validate form field

I am completely new to C# and I am trying to figure out form validation.
More specifically, I have a webform (C#) that I've split into to parts "form-part-1" and "form-part-2".
By default "form-part-2" is hidden. Once all fields in "form-part-1" are completed, you should be able to proceed to "form-part-2" by clicking on the "Continue" linkButton.
The jQuery part works well, showing and hiding form sections as desired.
But the validation is not enforced anymore.
I have validators in place but at this point I can proceed to "form-part-2" without filling out the "form-part-1" fields.
I would like the validation to be enforced before proceeding to "form-part-2".
Any tips and suggestions how to do it would be greatly appreciated.
Thanks in advance.
Here's my code:
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$("#continue").click(function (event) {
$('#form-part-1').hide();
$('#form-part-2').fadeIn();
});
});
</script>
<form id="SignUp" method="post" runat="server">
<table id="validation">
<tr>
<td colspan="2" vAlign="top">
<asp:ValidationSummary ID="vsSignupValidation" runat="server"></asp:ValidationSummary></td>
</tr>
</table>
<table id="form-part-2">
<tr>
<td width="150">
<label class="">
<asp:label id="lblSignupFirstName" Runat="server">First Name:</asp:label>
<span style="color:red">*</span>
</label>
</td>
<td>
<asp:TextBox size="30" CssClass="input" ID="txtSignupFirstName" TabIndex="1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td width="150">
<label class="">
<asp:label id="lblSignupLastName" Runat="server">Last Name:</asp:label>
<span style="color:red">*</span>
</label>
</td>
<td>
<asp:TextBox size="30" CssClass="input" ID="txtSignupLastName" TabIndex="1" runat="server"></asp:TextBox>
</td>
</tr>
</table>
<!-- validate and continue -->
<asp:LinkButton ID="continue" runat="server" onclientclick="return false;">Continue</asp:LinkButton>
<!-- validate and continue -->
<table id="form-part-1">
<tr>
<td width="150">
<label class="">
<asp:label id="lblSignupUserID" Runat="server">UserID:</asp:label>
<span style="color:red">*</span>
</label>
</td>
<td>
<asp:TextBox size="30" CssClass="input" ID="txtSignupUserID" TabIndex="1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td width="150">
<label class="">
<asp:label id="lblSignupPassword" Runat="server">Last Name:</asp:label>
<span style="color:red">*</span>
</label>
</td>
<td>
<asp:TextBox size="30" CssClass="input" ID="txtSignupPassword" TabIndex="1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td width="150">
<label class="">
<asp:Label class="formtxtsm" ID="lblSignupConfirmPassword" runat="server">Confirm password</asp:Label>
<span style="color:red">*</span>
</label></td>
<td>
<asp:TextBox size="30" ID="txtSignupConfirmPassword" TabIndex="10" runat="server" TextMode="Password" CssClass="input"></asp:TextBox>
</td>
</tr>
</table>
<!-- validators -->
<asp:requiredfieldvalidator id="rfvSignupFirstName" runat="server" Display="None" ControlToValidate="txtSignupFirstName" class="formerrortxt" ErrorMessage='"First Name" is required'></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="rfvSignupLastName" runat="server" Display="None" ControlToValidate="txtSignupLastName" class="formerrortxt" ErrorMessage='"Last Name" is required'></asp:requiredfieldvalidator>
<asp:RequiredFieldValidator ID="rfvSignupUserID" runat="server" Display="None" ControlToValidate="txtSignupUserID" ErrorMessage='"Username" is required.'></asp:RequiredFieldValidator>
<asp:requiredfieldvalidator id="rfvSignupPassword" runat="server" Display="None" ControlToValidate="txtSignupPassword" ErrorMessage='"Password" is required.'></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="rfvSignupConfirmPassword" runat="server" Display="None" ControlToValidate="txtSignupConfirmPassword" ErrorMessage='"Confirm password" is required.'></asp:requiredfieldvalidator>
<asp:customvalidator id="cvSignupPasswordMatch" runat="server" Display="None" ErrorMessage='"Password" and "Confirm password" must match exactly.'></asp:customvalidator>
</form>
**** EDIT:
Thanks Phx & Daniel for your feedback. Very helpful!
I got things working with one exception. The "form-part-2" fields get validated before I even get to the step 2. Any tips how to validate the username / password fields only after I get to the "form-part-2"? Thanks in advance!
here's my most recent version:
www.smithy.somee.com
and the code:
<script language="javascript" type="text/javascript">
$(document).ready(function () {
if (Page_ClientValidate("personalGroup")) {
$('#form-part-1').hide();
$('#form-part-2').fadeIn();
}
if (Page_ClientValidate("accountGroup")) {
$('#form-part-2').hide();
}
});
</script>
<form id="signup" runat="server">
<div>
<table id="validators">
<tr>
<td>
<asp:ValidationSummary ID="personalGroupSummary" runat="server" ValidationGroup="personalGroup" />
<asp:ValidationSummary ID="accountGroupSummary" runat="server" ValidationGroup="accountGroup" />
</td>
</tr>
</table>
<table id="form-part-1">
<tr>
<td>First Name:</td>
<td><asp:TextBox ID="txtFname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Last Name:</td>
<td><asp:TextBox ID="txtLname" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="continue" runat="server" causesvalidation="true" validationgroup="personalGroup" Text="Continue" />
</td>
</tr>
</table>
<table id="form-part-2">
<tr>
<td>Username:</td>
<td><asp:TextBox ID="txtUser" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Password:</td>
<td><asp:TextBox ID="txtPass" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td></td>
<td>
<asp:Button ID="btnSubmit" runat="server" validationgroup="accountGroup" Text="Submit" OnClick="btnSubmit_Click" />
</td>
</tr>
</table>
<!-- output -->
<table>
<tr>
<td>First: </td>
<td><asp:Label ID="lblFname" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Last:</td>
<td><asp:Label ID="lblLname" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>User:</td>
<td><asp:Label ID="lblUser" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td>Pass:</td>
<td><asp:Label ID="lblPass" runat="server" Text=""></asp:Label></td>
</tr>
</table>
</div>
<!-- validators -->
<asp:requiredfieldvalidator id="fvFname" runat="server" validationgroup="personalGroup" Display="None" ControlToValidate="txtFname" ErrorMessage='"First Name" is required'></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="fvLname" runat="server" validationgroup="personalGroup" Display="None" ControlToValidate="txtLname" ErrorMessage='"Last Name" is required'></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="fvUser" runat="server" validationgroup="accountGroup" Display="None" ControlToValidate="txtUser" ErrorMessage='"Username" is required'></asp:requiredfieldvalidator>
<asp:requiredfieldvalidator id="fvPass" runat="server" validationgroup="accountGroup" Display="None" ControlToValidate="txtPass" ErrorMessage='"Password" is required'></asp:requiredfieldvalidator>
<!-- validators -->
</form>
As you wrote: I would like the validation to be enforced before proceeding to "form-part-2".
You need to create validations groups in order to validate first N fields and the another N Fields.
So create Validation groups for your controls:
http://msdn.microsoft.com/en-us/library/vstudio/ms227424(v=vs.100).aspx
<asp:textbox id="AgeTextBox"
runat="Server">
</asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator2"
controltovalidate="AgeTextBox"
validationgroup="PersonalInfoGroup"
errormessage="Enter your age."
runat="Server">
</asp:requiredfieldvalidator>
<!--When Button1 is clicked, only validation
controls that are a part of PersonalInfoGroup
are validated.-->
<asp:button id="Button1"
text="Validate"
causesvalidation="true"
validationgroup="PersonalInfoGroup"
runat="Server" />
<asp:textbox id="CityTextBox"
runat="Server">
</asp:textbox>
<asp:requiredfieldvalidator id="RequiredFieldValidator3"
controltovalidate="CityTextBox"
validationgroup="LocationInfoGroup"
errormessage="Enter a city name."
runat="Server">
</asp:requiredfieldvalidator>
<!--When Button2 is clicked, only validation
controls that are a part of LocationInfoGroup
are validated.-->
<asp:button id="Button2"
text="Validate"
causesvalidation="true"
validationgroup="LocationInfoGroup"
runat="Server" />
Then use a Diferent validation summary for each group.
Perhaps you need a button for each validation but you can do the trick and use the same button for multiple validation groups:
http://www.aspsnippets.com/Articles/Validate-Multiple-Validation-Groups-with-one-Button-in-ASPNet.aspx
Another example here
http://www.codeproject.com/Tips/401611/Validate-multiple-Validation-group-both-client-and
Phx gives a partial answer. Use his suggestion to create ValidationGroups. Put all your validators in part 1 and part 2 in separate groups.
JQuery does not automatically trigger validation.
You need to call the validation manually with your JavaScript. This can be done by calling Page_ClientValidate which will validate all validators for the passed ValidationGroup.
For example:
$("#continue").click(function (event) {
if (Page_ClientValidate("group1")) {
$('#form-part-1').hide();
$('#form-part-2').fadeIn();
}
});

linkbutton are not posting back in asp.net

I have many linkbutton placed on a webform everything working correctly til yesterday. But now now my ajax extenders are not working and linkbuttons are posting back.
some of my code is
<table width="460px">
<tr>
<td colspan="2"
style=" color: #C48239; font-style: normal; font-size: 18px; font-family: 'Bookman Old Style'; text-align:center;height:22px;">
Manage Your Profile</td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnk_per_pro" runat="server" CssClass="linkButton"
PostBackUrl="~/User/Edit_profile.aspx">Edit Personal Profile</asp:LinkButton> </td>
<td>
<asp:LinkButton ID="lnk_par_pro" runat="server" CssClass="linkButton">Edit Partner's Profile</asp:LinkButton></td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnk_con_det" runat="server" CssClass="linkButton"
PostBackUrl="~/User/Edit_profile.aspx">Edit Contect Details</asp:LinkButton></td>
<td>
<asp:LinkButton ID="lnk_add_photos" runat="server" CssClass="linkButton">Add Photos</asp:LinkButton></td>
</tr>
<tr>
<td>
<asp:LinkButton ID="lnk_hob" runat="server" CssClass="linkButton"
PostBackUrl="~/User/Edit_profile.aspx">Edit Hobbies and Interests</asp:LinkButton></td>
<td>
<asp:LinkButton ID="lnk_del_pro" runat="server" CssClass="linkButton">Remove/Delete Profile</asp:LinkButton></td>
</tr>
</table></center>
</div>
</div><!-- div 2 end-->
<div id="div3">
<div id="inbox1"><b>About Myself</b>
</div>
<div id="inbox2">Partner Prefrence
</div>
</div>
<div id="div4">
<div id="indiv4"><b>Basics Information</b>
<div id="edit4">
<asp:LinkButton ID="lnk_edit" runat="server" CssClass="link"
PostBackUrl="~/User/Edit_profile.aspx"> Edit</asp:LinkButton> <img src="images/edit.png" alt="" />
</div>
</div>
<div id="indiv24">
<div id="lt"><table class="style1" >
<tr>
<td style="color: #666666; width: 180px">
Age</td>
<td style="width: 180px">
<asp:Label ID="lbl_age2" runat="server" Text="Label"></asp:Label>
</td></tr><tr>
<td style="color: #666666; width: 180px">
Mobile Number</td>
<td>
<asp:Label ID="lbl_mob2" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td style="color: #666666; width: 180px">
Height</td>
<td style="width: 180px">
<asp:Label ID="lbl_height2" runat="server" Text="Label"></asp:Label>
</td></tr><tr>
<td style="color: #666666; width: 180px">
Email Id</td>
<td>
<asp:Label ID="lbl_eml2" runat="server" Text="Label"></asp:Label>
</td>
</tr>
<tr>
<td style="color: #666666; width: 180px">
Marital Status</td>
<td style="width: 180px">
<asp:Label ID="lbl_mar_sts2" runat="server" Text="Label"></asp:Label>
</td></tr>
</table></div>
a link is shown on hover of linkbutton
javascript:webforms_DoPostbackWithOption:(NewPostBackoption("","false",true,"false"));
Do you have any validation controls inside application , check once by setting the Cause validation = false to link button control .
Some times your system has changed to old time(like one year back) also the link buttons won't redirect
There may be validation controls inside application , check once by setting the Cause validation = false to link button control .

Checkbox selected within hidden div

I have a C# Checkboxlist within a hidden div. The div displays upon certain events, then is closed. When the form is submitted, I try to update database bit fields based on selected values of the checkboxlist.items but they always return false whether checked or not. How can I get the selected value of the items when the div containing them is hidden?
The div is a dialog I show/hide using jquery
$(document).ready(function () {
$('#<%=txtLANG.ClientID %>').click(function () {
$("#overlay-back").dialog({
resizable: false,
modal: true,
width: 500,
height: 400,
buttons: {
OK: function () {
GetLanguages();
$(this).dialog("close");
},
Cancel: function () {
$(this).dialog("close");
}
}
});
});
});
and here's the DIV...the codebehind is nothing more than setting a parameter to true/false based on selected value of the checkboxlist items
<div id="overlay-back" style="display:none;">
<table width="100%">
<tr>
<td width="50%">
<asp:CheckBox runat="server" ID="chkEnglish" TextAlign="Right" Text=" English" />
<div class="popup-container">
<img id="help_button_chkEnglish" class="help-button" src="/Images/help-button.png" alt="" />
<div class="help-popup hidden" id="help_popup_chkEnglish">
<div class="popup-arrow-border"></div> <div class="popup-arrow"></div>
<asp:Label runat="server" ID="lblLANGDesc"></asp:Label>
</div>
</div>
</td>
<asp:Panel runat="server" ID="pnlTopLanguages">
<td rowspan="3" valign="top">
<asp:CheckBoxList ID="chkTopLanguages" TextAlign="Right" runat="server" />
<br />
<asp:Label runat="server" ID="lblNonTopLanguages"></asp:Label><br />
<asp:TextBox runat="server" ID="txtOtherLanguages" onkeypress="CopyOtherLangs(event)" onclick="clearLanguageSearchText()" Text="Other Languages..."></asp:TextBox>
<cc3:AutoCompleteExtender ID="aceSearch" runat="server" MinimumPrefixLength="1" TargetControlID="txtOtherLanguages"
ServicePath="~/controls/wsCommunity.asmx" ServiceMethod="GetLanguageCompletionList">
</cc3:AutoCompleteExtender>
</td>
<td rowspan="3">
<div class="popup-container">
<img id="help_button_chkTopLanguages" class="help-button" src="/Images/help-button.png" alt="" />
<div class="help-popup hidden" id="help_popup_chkTopLanguages">
<div class="popup-arrow-border"></div> <div class="popup-arrow"></div>
<asp:Label runat="server" ID="lblTopLangs"></asp:Label>
</div>
</div>
</td>
</asp:Panel>
</tr>
<tr>
<td>
<asp:CheckBox runat="server" ID="chkFrench" TextAlign="Right" Text=" French" />
<div class="popup-container">
<img id="help_button_chkFrench" class="help-button" src="/Images/help-button.png" alt="" />
<div class="help-popup hidden" id="help_popup_chkFrench">
<div class="popup-arrow-border"></div> <div class="popup-arrow"></div>
<asp:Label runat="server" ID="Label2"></asp:Label>
</div>
</div>
</td>
</tr>
<asp:Panel runat="server" ID="pnlEnhancedFrench">
<tr>
<td valign="top">
<asp:CheckBoxList ID="chkEnhancedFrench" TextAlign="Right" CssClass="EnhancedFrench" runat="server">
<asp:ListItem> Customer Service</asp:ListItem>
<asp:ListItem> Publications</asp:ListItem>
<asp:ListItem> Website</asp:ListItem>
<asp:ListItem> Interpreters</asp:ListItem>
</asp:CheckBoxList>
</td>
</tr>
</asp:Panel>
</table>
</div>

Categories

Resources