我有这个表单提交的问题,在按钮上点击这个表单直接进入它的动作,但首先我想验证文件上传并保存上传的文件..但是只要我点击提交按钮表单就会进入动作页面..你有什么想法为什么?
这是代码:
<form action="" id="form2" class="appForm">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<table class="jobTitleTbl" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th>Job Title</th>
<th>Job Posting Reference</th>
<th>Type of Job</th>
<th>Job Department</th>
</tr>
</thead>
<ul class="jobHeadings">
<li class="jobPos"><%# Eval("JobPosition") %></li>
<li class="jobCat"><%# Eval("JobCategory") %></li>
<li class="jobDate"><%# Eval("Posted", "{0:MMMM d, yyyy}")%></li>
<li class="jobApplyDate"><%# Eval("ApplyBy", "{0:MMMM d, yyyy}")%></li>
</ul>
<%-- <tbody>
<td class="lftBorder"><%# Eval("JobPosition") %></td>
<td><%# Eval("JobCategory") %></td>
<td></td>
<td><%# Eval("ApplyBy") %></td>
</tr>
</tbody>--%>
</table>
</ItemTemplate>
</asp:Repeater>
<fieldset>
<legend>Salary</legend>
<div class="formFieldsLft">
<asp:TextBox ID="txtBoxCurSalary" runat="server" value="" placeholder="Current Salary" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<div class="formFieldsLft">
<asp:TextBox ID="txtBoxExpSalary" runat="server" placeholder="Expected Salary" value="" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
</fieldset>
<fieldset>
<legend>Notice Period</legend>
<div class="formFieldsLft">
<asp:TextBox runat="server" ID="txtboxNoticePeriod" value="Notice Period Required for Joining" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<div class="formFieldsLft">
<asp:TextBox runat="server" ID="txtBoxExpecjoinDate" value="Expected Date of Joining" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
</fieldset>
<fieldset>
<legend>Personal Details</legend>
<div class="formFieldsLft">
<asp:TextBox runat="server" ID="txtBoxPerName" value="Name" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<div class="formFieldsLft">
<asp:TextBox runat="server" ID="TxtBoxFatherName" value="Father's Name" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<div class="formFieldsLft">
<label class="idCardLbl floatLft">CNIC#</label><asp:TextBox runat="server" class="" id="txtBoxidCard" type="text" value="99999-9999999-9" />
</div>
<div class="formFieldsLft">
<asp:TextBox runat="server" class="" type="text" value="Family Code" maxlength="6" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<div class="formFldsFull">
<asp:TextBox runat="server" class="smallFld" ID="txtBoxPhone" value="Phone" onblur="onBlur(this)" onfocus="onFocus(this)" />
<asp:TextBox runat="server" class="smallFld" ID="txtBoxMobile" value="Mobile" onblur="onBlur(this)" onfocus="onFocus(this)" />
<asp:TextBox runat="server" class="smallFld" ID="txtBoxEmail" value="Email" onblur="onBlur(this)" onfocus="onFocus(this)" />
</div>
<hr class="formDivider" />
<h3 class=" fullwidth">Upload Your CV</h3>
<div class="formFldsFull">
<input type="file" />
</div>
<asp:Button runat="server" ID="ButtonSubmit" CommandName="Apply" Class="btns btnRed floatLft"
Text="Submit"
oncommand="ButtonSubmit_Command" UseSubmitBehavior="False" />
</form>