<%
@ Page Language
=
"
C#
"
MasterPageFile
=
"
~/VQPMaster.master
"
AutoEventWireup
=
"
true
"
CodeFile
=
"
importQuotation.aspx.cs
"
Inherits
=
"
ImportExcel_importQuotation
"
Title
=
"
Untitled Page
"
%>
< asp:Content ID ="Content1" ContentPlaceHolderID ="ContentPlaceHolderMain" Runat ="Server" >
< script type ="text/javascript" src ="../js/jquery-1.5.2.js" ></ script >
< script language ="javascript" type ="text/javascript" >
$(document).ready( function (){
var fileUpload = $( " #<%=fileUpload.ClientID%> " );
var txtEmail = $( " #<%=txtEmail.ClientID%> " );
var lblMessage = $( " #<%=lblMessage.ClientID%> " );
lblMessage.text();
$( " #<%=btnSubmit.ClientID%> " ).click( function (){
if (fileUpload.val() == "" ){
fileUpload.focus();
lblMessage.text( " please upload file! " );
return false ;
}
else // valid the upload file extension file name!
{
var hash = {
' .XLS ' : 1 ,
' .XLSX ' : 1
};
var re = / \..+$ / ;
var ext = fileUpload.val().toUpperCase().match(re);
if ( ! hash[ext]) {
lblMessage.text( " Invalid filename, please select another file! " );
return false ;
}
}
if (txtEmail.val() == "" ){
lblMessage.focus();
lblMessage.text( " please input user email! " );
return false ;
}
})
$( " #btnReset " ).click( function (){
lblMessage.text( "" )
})
})
</ script >
< div id = "divUploadMain" style =" margin : 5px 0px 0px 4%; " >
< div id = "divFileUpload" style ="height : 30px; margin-bottom : 5px;" >
Quote File :
< asp:FileUpload ID ="fileUpload" runat ="server" Width ="464px" />
</ div >
< div id = "divEmail" style ="height : 30px; margin-top : 5px;" >
MAPS Email contact :
< asp:TextBox ID ="txtEmail" runat ="server" Width ="464px" ></ asp:TextBox >
</ div >
< div id ="divBtns" >
< asp:Button ID ="btnSubmit" runat ="server" Text ="Submit" />
< input id ="btnReset" type ="reset" value ="Reset" />
< asp:Label ID ="lblMessage" runat ="server" ForeColor ="Red" Visible ="true" Text ="" ></ asp:Label ></ div >
</ div >
</ asp:Content >
< asp:Content ID ="Content1" ContentPlaceHolderID ="ContentPlaceHolderMain" Runat ="Server" >
< script type ="text/javascript" src ="../js/jquery-1.5.2.js" ></ script >
< script language ="javascript" type ="text/javascript" >
$(document).ready( function (){
var fileUpload = $( " #<%=fileUpload.ClientID%> " );
var txtEmail = $( " #<%=txtEmail.ClientID%> " );
var lblMessage = $( " #<%=lblMessage.ClientID%> " );
lblMessage.text();
$( " #<%=btnSubmit.ClientID%> " ).click( function (){
if (fileUpload.val() == "" ){
fileUpload.focus();
lblMessage.text( " please upload file! " );
return false ;
}
else // valid the upload file extension file name!
{
var hash = {
' .XLS ' : 1 ,
' .XLSX ' : 1
};
var re = / \..+$ / ;
var ext = fileUpload.val().toUpperCase().match(re);
if ( ! hash[ext]) {
lblMessage.text( " Invalid filename, please select another file! " );
return false ;
}
}
if (txtEmail.val() == "" ){
lblMessage.focus();
lblMessage.text( " please input user email! " );
return false ;
}
})
$( " #btnReset " ).click( function (){
lblMessage.text( "" )
})
})
</ script >
< div id = "divUploadMain" style =" margin : 5px 0px 0px 4%; " >
< div id = "divFileUpload" style ="height : 30px; margin-bottom : 5px;" >
Quote File :
< asp:FileUpload ID ="fileUpload" runat ="server" Width ="464px" />
</ div >
< div id = "divEmail" style ="height : 30px; margin-top : 5px;" >
MAPS Email contact :
< asp:TextBox ID ="txtEmail" runat ="server" Width ="464px" ></ asp:TextBox >
</ div >
< div id ="divBtns" >
< asp:Button ID ="btnSubmit" runat ="server" Text ="Submit" />
< input id ="btnReset" type ="reset" value ="Reset" />
< asp:Label ID ="lblMessage" runat ="server" ForeColor ="Red" Visible ="true" Text ="" ></ asp:Label ></ div >
</ div >
</ asp:Content >