Ajax Modalpop up error - ajax

I have added a modal popextender
when i click on Edit button i ma getting following error.
Unhandled exception at line 1, column 55504 in http://localhost:59846/bundles/MsAjaxJs?v=c42ygB2U07n37m_Sfa8ZbLGVu4Rr2gsBo7MvUEnJeZ81
0x800a138f - JavaScript runtime error: Unable to get property '_events' of undefined or null reference
If there is a handler for this exception, the program may be safely continued.
Unhandled exception at line 1, column 55504 in http://localhost:59846/bundles/MsAjaxJs?

I have two pages View.aspx and AddEdit.aspx
On click of Edit button of View.aspx , Another page AddEdit.aspx in Modalpopup should be opened.
I am using AjaxControlTookit version 15.1.3.0
View.aspx
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="View.aspx.cs" Inherits="TransitionAutomationPlatform.WebApp.Templates.ContractSummaryNote.View" %>
<%# Register Src="../../UserControls/ucProcessInfo.ascx" TagName="ucProcessInfo" TagPrefix="uc1" %>
<%# Register Src="../../UserControls/ucGridActions.ascx" TagName="ucGridActions" TagPrefix="uc2" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<style type="text/css">
.DarkenBackground {
background-color: rgb(0, 0, 0);
opacity: 0.7; /* Safari, Opera */
filter: alpha(opacity=70); /* IE */
z-index: 20;
height: 100%;
width: 100%;
background-repeat: repeat;
position: fixed;
top: 0px;
left: 0px;
}
.ModalPopup {
background-color: #003e74;
filter: alpha(opacity=100); /* IE */
font-family: Verdana;
border-style: solid;
border-width: 0.75pt;
border-color: White;
}
.ModalPopup h {
background-color: #003e74;
filter: alpha(opacity=100); /* IE */
font-family: Verdana;
}
.GridViewFixedHeader {
position: relative;
color: White;
background-color: #646464;
}
.GridScrollBar {
overflow-y: auto;
height: 200px;
width: 300px;
}
.DefaultCursor {
cursor: default;
}
.MainPageTable {
border-collapse: collapse;
padding: 0;
margin: 0;
}
.ModalTable {
height: 100%;
width: 95%;
margin-left: auto;
margin-right: auto;
}
.ModalTableLabelTD {
font-size: 8pt;
font-weight: bold;
color: White;
width: 25%;
}
.ModalTableControlTD {
width: 160px;
}
.GridViewResult {
background-color: White;
width: 282px;
padding: 20px;
}
.GridViewResultRows {
color: Black;
background-color: White;
height: 30px;
}
</style>
<link href="../../Content/jquery.dataTables.css" rel="stylesheet" />
<link href="../../Content/TableTools.css" rel="stylesheet" />
<script src="../Datatables_Latest/jquery-1.11.3.min.js"></script>
<link href="../../Scripts/Datatables_Latest/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.css" rel="stylesheet" />
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="../../Scripts/Datatables_Latest/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.js"></script>
<script src="../../Scripts/Datatables_Latest/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.min.js"></script>
<script src="../../Scripts/jquery-1.10.2.min.js"></script>
<script src="../../Scripts/jquery-ui.min.js"></script>
<script src="../../Scripts/Datatables_Latest/jquery.dataTables.min.js"></script>
<%-- <script src="../../Scripts/jquery.dataTables.min.js"></script>--%>
<script src="../../Scripts/dataTables.buttons.min.js"></script>
<script src="../../Scripts/Datatables_Latest/buttons.flash.min.js"></script>
<script src="../../Scripts/Datatables_Latest/jszip.js"></script>
<script src="../../Scripts/Datatables_Latest/jszip.min.js"></script>
<script src="../../Scripts/Datatables_Latest/pdfmake.min.js"></script>
<script src="../../Scripts/Datatables_Latest/vfs_fonts.js"></script>
<script src="../../Scripts/Datatables_Latest/buttons.html5.min.js"></script>
<script src="../../Scripts/General.js"></script>
<script src="../../Scripts/JsTemplates/ContractSummaryNote.js"></script>
<div>
<uc1:ucProcessInfo ID="ucProcessInfo1" runat="server" />
</div>
<%-- <div style="float: right">
<uc2:ucGridActions ID="ucGridActions1" runat="server" />
</div>--%>
<br />
<div>
<table>
<thead class="gridHeader">
</thead>
</table>
<table>
<tr>
<td>
<div>
<input id="btnEdit" type="button" value="button" style="display: none; visibility: hidden;" runat="server" />
<div id="demo">
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>
</div>
<br />
</div>
</td>
</tr>
</table>
</div>
<asp:ModalPopupExtender ID="ModalPopupExtender1"
runat="server" CancelControlID="btnCancel"
OkControlID="btnOkay" TargetControlID="btnEdit"
PopupControlID="Panel1" PopupDragHandleControlID="PopupHeader"
Drag="true" BackgroundCssClass="DarkenBackground">
</asp:ModalPopupExtender>
<div class="popupConfirmation" id="Panel1" style="display: none">
<iframe id="frameeditexpanse" src="AddEdit.aspx" frameborder="0"></iframe>
<div class="popup_Buttons" style="display: none">
<input id="btnOkay" type="button" value="Done" />
<input id="btnCancel" type="button" value="Cancel" />
</div>
</div>
</asp:Content>
AddEdit.aspx
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AddEdit.aspx.cs" Inherits="TransitionAutomationPlatform.WebApp.Templates.ContractSummaryNote.AddEdit" %>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<link href="../../Content/jquery.dataTables.css" rel="stylesheet" />
<link href="../../Content/TableTools.css" rel="stylesheet" />
<script src="../../Scripts/General.js"></script>
<script src="../../Scripts/JsTemplates/ContractSummaryNote.js"></script>
<script type="text/javascript" src="../../Scripts/ZeroClipboard/ZeroClipboard.js"></script>
<script src="../../Scripts/jquery.dataTables.js"></script>
<script src="../../Scripts/dataTables.tableTools.js"></script>
<script src="../../Scripts/jquery-1.11.3.min.js"> </script>
<script src="../../Scripts/jquery-ui.min.js"></script>
<script src="../../Scripts/jquery.dataTables.min.js"></script>
<%--<script src="../../Scripts/dataTables.buttons.min.js"></script>--%>
<script src="../../Scripts/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.js"></script>
<script src="../../Scripts/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.js"></script>
<script src="../../Scripts/jquery-ui-1.11.3/jquery-ui-1.11.3/jquery-ui.min.js"></script>
<script src="../../Scripts/buttons.flash.min.js"></script>
<script src="../../Scripts/jszip.js"></script>
<script src="../../Scripts/jszip.min.js"></script>
<script src="../../Scripts/pdfmake.min.js"></script>
<script src="../../Scripts/vfs_fonts.js"></script>
<%--<script src="../../Scripts/dataTables.buttons.min.js"></script>--%>
<script src="../../Scripts/buttons.html5.min.js"></script>
<script src="../../Scripts/dataTables.editor.js"></script>
<div class="popup_Container">
<div class="popup_Titlebar" id="PopupHeader">
<div class="TitlebarLeft">
Edit Expanse
</div>
<div class="TitlebarRight" onclick="cancel();">
</div>
</div>
<div class="popup_Body">
<div id="dialog-message" title="Contract Summary Note Details">
<table>
<tr>
<td>
<table style="border-bottom: 1px solid #dadada;" class="ModalTable">
<tr>
<td>Document Name<span style="color: red;">*</span></td>
<td>
<input type="text" id="txtDocumentName" maxlength="50" /></td>
</tr>
<tr>
<td>Clause No<span style="color: red;">*</span></td>
<td>
<input type="text" id="txtClauseNo" maxlength="50" /></td>
</tr>
<tr>
<td>Page No <span style="color: red;">*</span></td>
<td>
<input type="text" id="txtPageNo" maxlength="50" /></td>
</tr>
<tr>
<td>Linl EPM Task<span style="color: red;">*</span></td>
<td>
<select name="ddlEPMTaskName" id="ddlEPMTaskName"></select>
<%-- Group Details--%>
</td>
</tr>
<tr>
<td>Due Date as per Project Plan</td>
<td>
<input type="text" id="txtDueDate" /></td>
</tr>
<tr>
<td>Function Name <span style="color: red;">*</span></td>
<td>
<select name="ddlFunctionName" id="ddlFunctionName"></select>
<%-- Group Details--%>
</td>
</tr>
<tr>
<td>Owner</td>
<td>
<input type="text" id="txtOwner" />
<tr>
<td>Activity at risk of missing Contracted Due Date</td>
<td>
<input type="checkbox" id="chkIsActivityAtRisk" value="" checked="checked" /></td>
</tr>
<tr>
<td>Status <span style="color: red;">*</span></td>
<td>
<select name="ddlStatus" id="ddlStatus"></select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
edit data
</div>
<div class="popup_Buttons">
<input id="btnOkay" type="button" value="Done" runat="server" />
<input id="btnCancel" type="button" value="Cancel" />
</div>
</div>
</asp:Content>
<%-- Reference for Js file --%>

Related

Wix not reading custom added JS when using custom added HTML

I am new to wix. I have added custom HTML to a section like so
<div id="emptyLegBoard-container-outer">
<div id="emptyLegBoard-container-inner">
<div style="display: inline-block;width: 100%;">
<h1 style="width: fit-content;display: inline-block; color: white"><i style="color: orange"
class="fas fa-plane-departure"
aria-hidden="true"></i>Empty Legs</h1>
<h1 id="titleMonth" style="display: inline-block;float: right; color: white"></h1>
</div>
<div id="emptyLegBoard">
<table style="width: 100%; overflow: auto">
<tr id="boardHeadingRow">
<td style="width: 15%" class="boardHeadings">DATE</td>
<td style="width: 20%" class="boardHeadings">FROM</td>
<td style="width: 20%" class="boardHeadings">TO</td>
<td style="width: 20%" class="boardHeadings">TIME</td>
<td style="width: 25%" class="boardHeadings">PRICE</td>
</tr>
</table>
<div id="emptyLegBoardInner">
</div>
</div>
</div>
</div>
<script>
window.onload = function(e){
renderBoard();
}
</script>
then I have added some custom JS and CSS:
Header:
<script src="https://kit.fontawesome.com/dd348bbd0a.js" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css?family=Fira+Sans&display=swap" rel="stylesheet">
<style>
i {
margin-right: 0.5em;
}
</style>
etc
Bottom of body:
<script>
function renderBoard() {
//my js code
}
</script>
etc...
Custom code
when the webpage load the css doesn't seem to be read and in the console I get "Uncaught ReferenceError: renderBoard is not defined"
so my custom code is not been read or my custom html code cannot reach it. Wondering how to fix this issue.
Custom html code
Thanks

Printing pdf formated receipts using RP327 80mm Thermal Receipt Printer

I'm using dompdf to generate pdf formatted receipts which than be printed using RP327 80mm Thermal Receipt Printer. But printed receipts are not fitting the paper properly. Here is an attached image of printed receipts pos receipt.
Here is my html table which is converted to a pdf file
<?php
ob_clean();
$dompdf = new DOMPDF();
$dompdf->set_option('default_font', 'Courier');
$customPaper = array(0,0,340,650);
//$dompdf->set_paper($customPaper);
$dompdf->set_option('enable_css_float',true);
//$dompdf->set_paper("A3", "portrait");
$html =' <html>
<head><style>
.table { display: table; width: 100%; border-collapse: collapse; }
.table-row { display: table-row; }
.table-cell { display: table-cell; border: 1px solid black; padding: 1em; }
}
span { display: block; }
#page table {
size: 340px 650px;
margin: 0px;;
}
.table {
page: table;
page-break-after: always;
font-size: 20px;
}
</style>
</head>
<body>
<div class="table">
<div class="table-row"><div class="table-cell" colspan="3" style="text-align: center"><img src="../../img/top-logo.png"></div></div>
<div class="table-row">
<div class="table-cell" ><span><b> Merchant: </b> '.$parceldetails['company'].' </span><span><b> Pick Addr: </b> '.$parceldetails['addr'].' </span><span><b> Mobile: </b> '.$parceldetails['mobile'].' </span></div>
<div class="table-cell" style="padding: 0px">
<div class="" >Delivery Date:</div><br>
<div class="" style="border-bottom: 1px solid #000000"> '.$parceldetails['r_delivery_time'].' at '.$parceldetails['bytime'].'</div>
<div class="">Agent:</div><br>
<div class=""> '.$parceldetails['name'].' </div>
</div>
</div>
<div class="table-row">
<div class="table-cell" colspan="3" style="text-align: center"> <b style="font-size: larger">'.$ecr.'</b></div>
</div>
<div class="table-row">
<div class="table-cell" colspan="1"><span><b>Customer Name:</b> '.$parceldetails['r_name'].'</span><span><b> Addr:</b> '.$parceldetails['r_address'].' </span><span><b> Mobile: </b> '.$parceldetails['r_mobile'].' </span></div>
<div class="table-cell" style="padding: 0px">
<div class="" style="border-bottom: 2px solid #000000; text-align: center"><b> '.$parceldetails['paymentmethod'].' </b></div>
<div class="" style="text-align: center"><b> '.$parceldetails['product_price'].' BDT </b></div>
</div>
</div>
<div class="table-row">
<div class="table-cell" style="text-align: center"> '.genarateQRCode($data).' </div>
<div class="table-cell" style="padding: 0px">
<div class="" style="border-bottom: 2px solid #000000; text-align: center; height:63px"> Delivered </div>
<div class="" style="text-align: center; min-height:63px"> Cancel </div>
</div>
<div class="table-cell" style="padding: 0px">
<div class="" style="border-bottom: 2px solid #000000; text-align: center; height:63px"> </div>
<div class="" style="text-align: center; min-height:63px""></div>
</div>
</div>
<div class="table-row">
<div class="table-cell" colspan="3">
<b style="margin-top:50px; margin-bottom:-10px; border-bottom: 1px solid #000000; font-size:10px; margin-left:10px">Agent signature</b>
<b style="margin-top:50px; margin-bottom:-10px; border-bottom: 1px solid #000000; font-size:10px; margin-left:50px">Receiver signature</b></div>
</div>
</div>';
$html .='<table class="table">
<tr>
<td colspan="3"><img src="../../img/top-logo.png"></td>
</tr>
<tr>
<td rowspan="2" colspan="2"><span><b> Merchant: </b> '.$parceldetails['company'].' </span><span><b> Pick Addr: </b> '.$parceldetails['addr'].' </span><span><b> Mobile: </b> '.$parceldetails['mobile'].' </span></td>
<td>D. Date<span>'.$parceldetails['r_delivery_time'].'</span></td>
</tr>
<tr>
<td>Agent<span>'.$parceldetails['name'].'</span></td>
</tr>
<tr>
<td colspan="3">'.$ecr.'</td>
</tr>
<tr>
<td rowspan="2" colspan="2"><span><b>Customer Name:</b> '.$parceldetails['r_name'].'</span><span><b> Addr:</b> '.$parceldetails['r_address'].' </span><span><b> Mobile: </b> '.$parceldetails['r_mobile'].' </span></td>
<td><b>'.$parceldetails['paymentmethod'].'</b></td>
</tr>
<tr>
<td><b>'.$parceldetails['product_price'].' BDT</b></td>
</tr>
<tr>
<td rowspan="2" colspan="1">'.genarateQRCode($data).'</td>
<td>Delivered</td>
<td></td>
</tr>
<tr>
<td>Cancel</td>
<td></td>
</tr>
<tr>
<td colspan="3">&nbsp</td>
</tr>
<tr>
<td colspan="3">Agent Signature Receiver Signature</td>
</tr>
</table>
</body>
</html>';
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("dompdf_out.pdf", array('Attachment' => 0));
<?>
According to the linked printer specs the printer is capable of printing to a width of either 72mm or 64mm. That translates to roughly 204pt and 181pt (respectively). Rather than relying on a larger paper size and limiting your content width I'd try to work within the constraints you have.
You should also keep in mind that dompdf translates pixel-based measurements into the appropriate point size based on the DPI specified for your document. If you want a one-to-one correspondence between your HTML document and the rendered PDF you should set the Dompdf DPI to 72 since the PDF PPI is fixed at 72.
With that in mind here's my advice. I'm assuming you're using Dompdf 0.6.x based on the method calls.
Set your paper size appropriately. Let's assume you have the 72mm width paper.
$dompdf->set_paper(array(0,0,204,650));
Set your DPI
$dompdf->set_option('dpi', 72);
If you're going to use a table for layout then you should just go ahead and use table elements. Styling DIVs with table display types will just cause them to be treated like table elements. What you have will work fine, but it will be clearer to you what's going on if you just use table elements.
Know that Dompdf be a bit quirky in relation to tables. One thing to keep in mind is that Dompdf won't allow table cells to be smaller than the contained content (for normally flowed content).
It's hard to give any input on why the printer is cutting off the content. I'd suggest cleaning up your code. I just noticed that you have the same content twice, once as DIVs styled to be table elements and a second time as an actual table.
It seems that this is a problem about drivers, you can solve this problem on official webiste: https://posguy.pro/en/support

Xpath of checkbox inside iframe inside div

for the life of me, I cannot get the xpath of this....
i think the problem is that there are two divs one, called 'div_settings_A' and 'div_settings_C', in the example below you cant see the 'div_settings_C' because its hidden, just cant put my finger on why it wont work!
I have tried
//div[contains(#id, 'div_settings_A')]/input
//tr[#id='inputSavePaymentAccounts'] and td[#name='payAck']
<iframe id="ccPayWiz" class="ui-dialog-content ui-widget-content" src="ccxPaymentDetails.php?c=1805&a=733344&d=null&m=Automation#billtrust.com&b=768866910" style="width: 99%; min-height: 105.833px; height: 717px; position: relative;" scrolltop="0" scrollleft="0">
<!DOCTYPE html>
<html>
<head>
<body style="border: 0px; margin: 0px; padding: 0px;" onload="setuppanes('IG');">
<input id="wpsURL" type="hidden" value="WPS_URL">
<form id="frmPay" onsubmit="return paywizAccountHelper.validateForm(this, '17', 'US');" action="ccProcessPayment.php" method="post" name="frmPay">
<input type="hidden" name="csrf" value="e5297f08b85318aa2ec176a5d8fac2a2">
<div id="divPayWizard2">
<div style="float:left; margin-top:5px">
<ul class="steps ui-widget ui-helper-clearfix">
<li>
<li>
<li>
</ul>
</div>
<br clear="all">
<hr>
<p>
<span class="cc-font"> Enter the customer's billing information to process the payment.</span>
</p>
<div id="divpane1">
<table id="tablepane1" class="cc-pane1-table cc-font">
<br>
</div>
<div id="divpane2">
<table class="cc-pane2-table-top cc-font">
</div>
<div id="div_settings_A" style="display: block;">
<input type="hidden" value="733344" name="SrchAcctNum">
<table class="cc-font" width="700" cellspacing="3" border="0">
<input id="BankCountry" type="hidden" value="US" name="BankCountry">
<tbody>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr>
<tr id="inputSavePaymentAccounts" class="savePaymentAccounts" style="display: table-row;">
<td class="addCCLabel" style="padding-top: 15px">Save this Payment Method</td>
<td style="padding-top: 15px">
<input class="payAck" type="checkbox" name="payAck" style="margin: 0; padding 0" tabindex="9">
</td>
</tr>
You can directly get that ccheck box element by using name attribute as :
.//input[#type = 'checkbox' and #name = 'payAck']
Or if there are multiple check boxes with the same name then try using descendant of tr as :
.//tr[#id = 'inputSavePaymentAccounts']/descendant::input[#type = 'checkbox' and #name = 'payAck']
Or
.//tr[#id = 'inputSavePaymentAccounts']/descendant::input
Hope it helps...:)

ruby selenium click on button with class name

I'm using ruby and selenium to test a web page, with the two buttons below
<div class="AVdis">
<span class="gwt-InlineHTML"/>
<a class="AVcur" name="attendEdit"; font-size: 12px;">[edit]</a>
</div>
<div class="lineHeight">
<button type="button" class="pcbtn" style="display: inline-block;">yes</button>
</div>
I've tried to use
driver.find_elements(:class, 'AVcur').click
driver.find_elements(:class, 'pcbtn').click
but it doesn't work, please advise.
Thanks
updated the full HTML code(the part code of class 'pcbtn' ONLY, it doesn't include the part with class 'AVcur'.):
<body>
<iframe src="javascript:'';" id="__gwt_historyFrame" style="width: 0px; height: 0px; border: 0px; display: block;"/>
<iframe src="javascript:''" id="Attend" tabindex="-1" style="position: absolute; width: 0px; height: 0px; border: none;"/>
<div style="display: none;"/>
<div class="GFKFO5SBPF hBody nClientFalse">
<div class="left" style="width: 198px;">
<div class="contents nClientFalse2">
<div class="AVright">
<div class="GFKFO5SBIQ">
<div class="AVfirstTd">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<div>
<table cellpadding="0" cellspacing="0" class="pcattd_record" width="630px">
<tbody>
<tr class="GFKFO5SBCS">
<tr class="GFKFO5SBCS">
<th>
<td>
<table class="noborder">
<tbody>
<tr>
<td>
<td>
<div class="lineHeight">
<button type="button" class="pcbtn" style="display: inline-block;">press button</button>
Try to click it, using xpath:
driver.find_element(:xpath, "//div[#class='AVdis']//a[#name='attendEdit']").click
Second element xpath:
driver.find_element(:xpath, "//div[#class='lineHeight']//button[#class='pcbtn'][text()='yes']").click
Click an element:
driver.find_element(css: 'a').click

issue with validation in asp.net mvc3

i am system.datamodel.dataannotation for validating my views.
below is my Model for the view.
using System.ComponentModel.DataAnnotations;
public class LoginVM
{
[Required(ErrorMessage="Please provide UserName")]
public string UserName { get; set; }
public string Password { get; set; }
}
below is my view for Login
<% using (Html.BeginForm())
{ %>
<% Html.ValidationSummary(true); %>
<div style="width: 100%; height: 100%; border-style: none;">
<fieldset style="border-style: none;">
<table style="width: 100%; height: 100%; border-style: none;" border="0">
<tr>
<td style="height: 100px;" colspan="4">
</td>
<td class="editor-label" style="width: 35%; font-size: medium; vertical-align: top;
text-align: justify;">
<%: Html.Label("Sign in with your Account Credentials")%><br />
<br />
Support / Contact Us
</td>
<td style="width: 5%;">
</td>
<td style="width: 60%; border-left-width: 2px; border-left-color: #E3E3E3; border-left-style: solid;">
<table style="border-style: none;" border="0">
<tr>
<td colspan="3">
</td>
</tr>
<tr style="height: 30px;">
<td style="width: 20%;" class="login-display-label">
<%: Html.LabelFor(m=>m.UserName,"UserName :") %><br />
<br />
<%: Html.LabelFor(m=>m.Password,"Password :") %><br />
<br />
</td>
<td style="width: 182px;" colspan="2">
<%: Html.TextBoxFor(m=>m.UserName,"UserName :")%><br />
<%: Html.ValidationMessageFor(m=>m.UserName) %><br />
<%: Html.TextBoxFor(m=>m.Password,"Password :")%><br />
<%: Html.ValidationMessageFor(m=>m.Password) %><br />
</td>
</tr>
<tr>
<td>
&nbsp
</td>
<td style="width: 182px;" colspan="3">
<input type="button" id="btnSubmit" value="Submit" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</div>
below is the scripts i have putted on my view as well as my site.master page
<script src="../../Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.validate.unobtrusive.js" type="text/javascript"></script>
i have also checked my web.config for below markup
<appSettings>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
after lots of effort my validation doesnt occur please help me....
let me known what necessary change i have to make.
thnaks in advance
change javascript Address:
<script src="#Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.validate.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.validate.unobtrusive.js")" type="text/javascript"></script>
and Html Helper
Html.TextBoxFor(m=>m.UserName)

Resources