Hall Ticket Format in HTML CODE
Css
<style type="text/css">
.Mystar
{
color: Red;
}
.card
{
box-shadow: 1px 4px 8px 1px rgba(0, 0, 0, 0.2);
width: 650px;
margin: auto;
text-align: left;
border: 2px solid;
}
button
{
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: #000;
background-color: #3e9dff;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
font-weight: bold;
}
.title
{
color: grey;
font-size: 18px;
}
</style>
print java script
<script type="text/javascript">
function printContent(el) {
var restorepage = document.body.innerHTML;
var printcontent = document.getElementById(el).innerHTML;
document.body.innerHTML = printcontent;
window.print();
document.body.innerHTML = restorepage;
}
</script>
Code
<form id="form_sample_1" class="form-horizontal" runat="server">
<asp:MultiView ID="mvStudentdetails" runat="server">
<asp:View ID="vEditDetails" runat="server">
<div class="form-body">
<div class="page-head">
<div class="container">
<div class="page-title">
<h1 style="text-align: center;">
NTR Vidyonnathi Plus Application Form</h1>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-advance" style="width: 90%;
margin: auto;">
<tr>
<td>
Aadhaar Card Number<span class="Mystar">*</span> :
</td>
<td>
<input type="text" id="txtAadharcardnumber" class="form-control" placeholder="Aadhaar Card Number"
runat="server" minlength="12" maxlength="12" onkeydown="return isNumeric(event.keyCode);"
onpaste="return false;" />
<asp:Label ID="lblErrormsg" runat="server" Style="color: Red;"></asp:Label>
</td>
</tr>
<tr>
<td colspan="4">
<div class="form-actions top">
<div class="row" style="margin-left: 440PX;">
<div class="col-md-offset-3 col-md-9">
<asp:LinkButton ID="lnksubmit" CommandName="PostData" type="button" class="btn green"
runat="server" OnCommand="lnkPost_Command" OnClientClick="javascript:validate()">Search</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" class="btn btn-default" runat="server" CommandName="back"
OnCommand="btnback_Click">Back</asp:LinkButton>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<script language="javascript" type="text/javascript">
function validate() {
if (document.getElementById("<%=txtAadharcardnumber.ClientID%>").value == "") {
alert("Please Enter Aadhar card number");
document.getElementById("<%=txtAadharcardnumber.ClientID%>").focus();
return false;
}
return true;
function isNumeric(keyCode) {
return ((keyCode >= 48 && keyCode <= 57) || keyCode == 8)
}
function isAlpha(keyCode) {
return ((keyCode >= 65 && keyCode <= 90) || keyCode == 8)
}
function isAlphaNumeric(keyCode) {
return ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || keyCode == 8)
}
}
</script>
</asp:View>
<asp:View ID="vUpdatedetails" runat="server">
<div id="div1" class="block">
<div class="form-body">
<div class="page-head">
<div class="container">
<div class="page-title">
<h1 style="text-align: center;">
NTR Vidyonnathi Plus Application Form</h1>
</div>
</div>
</div>
<div id="div2" class="block">
<table class="card">
<tr>
<td colspan="3" style="border-bottom: 2px solid;">
<table>
<tr>
<td>
<img src="../images/IAS-logo.png" alt="Logo" style="width: 75px; height: 75px; margin: 0 0px 7px 0px;">
</td>
<td>
<div>
<span style="color: red; font-size: 30px; font-weight: bold;">Dr. Lakshmaiah IAS Study
Circle</span><br />
<span style="color: #000; font-size: 20px; font-weight: bold; padding-left: 160px;">
Hall Ticket</span><br />
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<span style="color: #000; font-weight: bold;">(Information as furnished by the Candidate)</span><br />
<span style="float: right; margin-right: 30px; font-size: 15px; font-weight: bold;">
Hall Ticket NO</span><br />
<br />
<div style="float: right; border: 1px solid; width: 180px; height: 35px; margin-right: 7px;">
<span style="float: right; margin-right: 30px; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblIdno" runat="server"></asp:Label></span>
</div>
<br />
<div style="float: right; border: 1px solid; margin: 30px -135px 0 0;">
<asp:Image ID="imgpo" Width="100px" Height="100px" Style="margin: 5px 5px 5px 5px;"
runat="server" onerror="this.onload = null; this.src='Documents/defaultPhoto.png';" />
</div>
<br />
<div style="float: right; border: 1px solid; width: 180px; height: 40px; margin: 135px -160px 0 0;">
<asp:Image ID="Imagesignature" Width="100px" Height="30px" Style="margin: 5px 5px 5px 5px;"
runat="server" onerror="this.onload = null; this.src='Documents/IASSIGNATER.jpg';" />
</div>
</td>
</tr>
<tr>
<td colspan="3">
<table style="border: 1px solid; margin: -209px 0 0 10px; width: 415px; height: 155px;
font-weight: bold;">
<tr>
<td style="padding-left: 10px;">
NAME
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblName" runat="server" CssClass="uppercase"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Father name
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblFathername" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Mobile No
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblMobileno" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Category
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblCategory" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Address
</td>
<td>
:
</td>
<td>
<asp:Label ID="lbldoorno" runat="server"></asp:Label>,
<asp:Label ID="lblDistrict" runat="server"></asp:Label>,
<asp:Label ID="lblState" runat="server"></asp:Label>.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table style="margin: -45px 0 0 10px; border: 1px solid; width: 200px; height: 100px;
font-weight: bold;">
<tr>
<td style="background: #ddd; text-align: center; border-bottom: 1px solid;">
<span>Test Date & Time</span>
</td>
</tr>
<tr>
<td style="text-align: center;">
<span>08-10-2017</span><br />
<span>Sunday</span><br />
<span>10.00 AM To 1.00 PM</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table style="margin: -100px 0 0 220px; border: 1px solid; width: 205px; height: 100px;
font-weight: bold;">
<tr>
<td style="background: #ddd; text-align: center; border-bottom: 1px solid;">
<span>Test Center</span>
</td>
</tr>
<tr>
<td style="text-align: center;">
<span>Acharya Nagarjuna University</span><br />
<span>Guntur, Andhra Pradesh-522510</span><br />
<span>Phone No:8688 8896 33</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<span style="margin: 20px 15px -86px 10px; float: left; font-weight: bold;">Signature
of the Candidate</span><br />
<br />
<span style="padding: 5px 20px 5px 10px;">(To be Signed in the presence of the Invigilator)</span>
</td>
</tr>
<tr>
<td colspan="3">
<img src="../images/IASSIGNATER.jpg" style="margin: -18px 15px -86px 0; float: right;"
alt="sigen" />
<span style="float: right; padding: 5px 20px 5px 0;">CONVENER</span>
</td>
</tr>
</table>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-advance" style="width: 75%;
margin: auto;">
<tr>
<td colspan="4">
<div class="form-actions top">
<div class="row" style="margin-left: 260PX;">
<div class="col-md-offset-3 col-md-9">
<button class="btn blue" type="button" onclick="printContent('div1')" style="width: 60px;">
Print
</button>
<asp:LinkButton ID="btnback" class="btn green" runat="server" CommandName="Cancelprint"
OnCommand="btnCancel_Click">Cancel</asp:LinkButton>
</div>
</div>
</div>
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
</form>
code for cs file
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ClearData();
mvStudentdetails.ActiveViewIndex = 0;
}
}
protected void lnkPost_Command(object sender, CommandEventArgs e)
{
if (e.CommandName == "PostData")
{
try
{
if (txtAadharcardnumber.Value == "")
{
txtAadharcardnumber.Focus();
}
else
{
ViewSTUdentIDcarddtls();
// mvStudentdetails.ActiveViewIndex = 1;
}
}
catch (Exception ex)
{
}
}
}
private void ViewSTUdentIDcarddtls()
{
try
{
ClsBONTRVidyonnathiPlus objUserdtls = new ClsBONTRVidyonnathiPlus();
objUserdtls.AadhaarCardNumber = Convert.ToString(txtAadharcardnumber.Value);
objUserdtls.spType = "G";
DataSet ds = objUserdtls.FetchNTRVidyonnathiPlusformsBySpType();
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
imgpo.ImageUrl = "~/Documents/" + ds.Tables[0].Rows[0]["Photograph"].ToString();
Imagesignature.ImageUrl = "~/Documents/" + ds.Tables[0].Rows[0]["ST_Signature"].ToString();
lblName.Text = ds.Tables[0].Rows[0]["CandidatenamewithSurname"].ToString();
//DateTime Fromdate = DateTime.Parse(ds.Tables[1].Rows[0]["DateofBirth"].ToString());
//string FromformattedDate = Fromdate.ToString("dd-MM-yyyy");
lblMobileno.Text = ds.Tables[0].Rows[0]["MobileNumber"].ToString(); ;
//lblBatch.Text = ds.Tables[1].Rows[0]["FatherName"].ToString();
// lblCourse.Text = ds.Tables[1].Rows[0]["Coursename"].ToString();
lblCategory.Text = ds.Tables[0].Rows[0]["Category"].ToString();
lblIdno.Text = ds.Tables[0].Rows[0]["Application_No"].ToString();
lblFathername.Text = ds.Tables[0].Rows[0]["FatherName"].ToString();
lbldoorno.Text = ds.Tables[0].Rows[0]["DoorNumber"].ToString();
lblDistrict.Text = ds.Tables[0].Rows[0]["DistrictName"].ToString();
lblState.Text = ds.Tables[0].Rows[0]["StateName"].ToString();
mvStudentdetails.ActiveViewIndex = 1;
ClearData();
// lblValidity.Text = ds.Tables[1].Rows[0]["Validity"].ToString();
}
else
{
ClearData();
lblErrormsg.Text = "Sorry,Your Record Not Found,Please Register NTR Vidyonnathi Plus";
mvStudentdetails.ActiveViewIndex = 0;
}
}
}
catch (Exception ex)
{
}
}
public void ClearData()
{
txtAadharcardnumber.Value = "" ;
lblErrormsg.Text = "";
}
protected void btnback_Click(object sender, CommandEventArgs e)
{
if (e.CommandName == "back")
{
ClearData();
Response.Redirect("~/NTRVidyonnathiPlusApplication.aspx", true);
}
}
protected void btnCancel_Click(object sender, CommandEventArgs e)
{
if (e.CommandName == "Cancelprint")
{
try
{
ClearData();
mvStudentdetails.ActiveViewIndex = 0;
}
catch (Exception ex)
{ }
}
}
Css
<style type="text/css">
.Mystar
{
color: Red;
}
.card
{
box-shadow: 1px 4px 8px 1px rgba(0, 0, 0, 0.2);
width: 650px;
margin: auto;
text-align: left;
border: 2px solid;
}
button
{
border: none;
outline: 0;
display: inline-block;
padding: 8px;
color: #000;
background-color: #3e9dff;
text-align: center;
cursor: pointer;
width: 100%;
font-size: 18px;
font-weight: bold;
}
.title
{
color: grey;
font-size: 18px;
}
</style>
print java script
<script type="text/javascript">
function printContent(el) {
var restorepage = document.body.innerHTML;
var printcontent = document.getElementById(el).innerHTML;
document.body.innerHTML = printcontent;
window.print();
document.body.innerHTML = restorepage;
}
</script>
Code
<form id="form_sample_1" class="form-horizontal" runat="server">
<asp:MultiView ID="mvStudentdetails" runat="server">
<asp:View ID="vEditDetails" runat="server">
<div class="form-body">
<div class="page-head">
<div class="container">
<div class="page-title">
<h1 style="text-align: center;">
NTR Vidyonnathi Plus Application Form</h1>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-advance" style="width: 90%;
margin: auto;">
<tr>
<td>
Aadhaar Card Number<span class="Mystar">*</span> :
</td>
<td>
<input type="text" id="txtAadharcardnumber" class="form-control" placeholder="Aadhaar Card Number"
runat="server" minlength="12" maxlength="12" onkeydown="return isNumeric(event.keyCode);"
onpaste="return false;" />
<asp:Label ID="lblErrormsg" runat="server" Style="color: Red;"></asp:Label>
</td>
</tr>
<tr>
<td colspan="4">
<div class="form-actions top">
<div class="row" style="margin-left: 440PX;">
<div class="col-md-offset-3 col-md-9">
<asp:LinkButton ID="lnksubmit" CommandName="PostData" type="button" class="btn green"
runat="server" OnCommand="lnkPost_Command" OnClientClick="javascript:validate()">Search</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" class="btn btn-default" runat="server" CommandName="back"
OnCommand="btnback_Click">Back</asp:LinkButton>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
<script language="javascript" type="text/javascript">
function validate() {
if (document.getElementById("<%=txtAadharcardnumber.ClientID%>").value == "") {
alert("Please Enter Aadhar card number");
document.getElementById("<%=txtAadharcardnumber.ClientID%>").focus();
return false;
}
return true;
function isNumeric(keyCode) {
return ((keyCode >= 48 && keyCode <= 57) || keyCode == 8)
}
function isAlpha(keyCode) {
return ((keyCode >= 65 && keyCode <= 90) || keyCode == 8)
}
function isAlphaNumeric(keyCode) {
return ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <= 90) || keyCode == 8)
}
}
</script>
</asp:View>
<asp:View ID="vUpdatedetails" runat="server">
<div id="div1" class="block">
<div class="form-body">
<div class="page-head">
<div class="container">
<div class="page-title">
<h1 style="text-align: center;">
NTR Vidyonnathi Plus Application Form</h1>
</div>
</div>
</div>
<div id="div2" class="block">
<table class="card">
<tr>
<td colspan="3" style="border-bottom: 2px solid;">
<table>
<tr>
<td>
<img src="../images/IAS-logo.png" alt="Logo" style="width: 75px; height: 75px; margin: 0 0px 7px 0px;">
</td>
<td>
<div>
<span style="color: red; font-size: 30px; font-weight: bold;">Dr. Lakshmaiah IAS Study
Circle</span><br />
<span style="color: #000; font-size: 20px; font-weight: bold; padding-left: 160px;">
Hall Ticket</span><br />
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" style="text-align: center;">
<span style="color: #000; font-weight: bold;">(Information as furnished by the Candidate)</span><br />
<span style="float: right; margin-right: 30px; font-size: 15px; font-weight: bold;">
Hall Ticket NO</span><br />
<br />
<div style="float: right; border: 1px solid; width: 180px; height: 35px; margin-right: 7px;">
<span style="float: right; margin-right: 30px; font-size: 15px; font-weight: bold;">
<asp:Label ID="lblIdno" runat="server"></asp:Label></span>
</div>
<br />
<div style="float: right; border: 1px solid; margin: 30px -135px 0 0;">
<asp:Image ID="imgpo" Width="100px" Height="100px" Style="margin: 5px 5px 5px 5px;"
runat="server" onerror="this.onload = null; this.src='Documents/defaultPhoto.png';" />
</div>
<br />
<div style="float: right; border: 1px solid; width: 180px; height: 40px; margin: 135px -160px 0 0;">
<asp:Image ID="Imagesignature" Width="100px" Height="30px" Style="margin: 5px 5px 5px 5px;"
runat="server" onerror="this.onload = null; this.src='Documents/IASSIGNATER.jpg';" />
</div>
</td>
</tr>
<tr>
<td colspan="3">
<table style="border: 1px solid; margin: -209px 0 0 10px; width: 415px; height: 155px;
font-weight: bold;">
<tr>
<td style="padding-left: 10px;">
NAME
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblName" runat="server" CssClass="uppercase"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Father name
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblFathername" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Mobile No
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblMobileno" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Category
</td>
<td>
:
</td>
<td>
<asp:Label ID="lblCategory" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td style="padding-left: 10px;">
Address
</td>
<td>
:
</td>
<td>
<asp:Label ID="lbldoorno" runat="server"></asp:Label>,
<asp:Label ID="lblDistrict" runat="server"></asp:Label>,
<asp:Label ID="lblState" runat="server"></asp:Label>.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table style="margin: -45px 0 0 10px; border: 1px solid; width: 200px; height: 100px;
font-weight: bold;">
<tr>
<td style="background: #ddd; text-align: center; border-bottom: 1px solid;">
<span>Test Date & Time</span>
</td>
</tr>
<tr>
<td style="text-align: center;">
<span>08-10-2017</span><br />
<span>Sunday</span><br />
<span>10.00 AM To 1.00 PM</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<table style="margin: -100px 0 0 220px; border: 1px solid; width: 205px; height: 100px;
font-weight: bold;">
<tr>
<td style="background: #ddd; text-align: center; border-bottom: 1px solid;">
<span>Test Center</span>
</td>
</tr>
<tr>
<td style="text-align: center;">
<span>Acharya Nagarjuna University</span><br />
<span>Guntur, Andhra Pradesh-522510</span><br />
<span>Phone No:8688 8896 33</span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<span style="margin: 20px 15px -86px 10px; float: left; font-weight: bold;">Signature
of the Candidate</span><br />
<br />
<span style="padding: 5px 20px 5px 10px;">(To be Signed in the presence of the Invigilator)</span>
</td>
</tr>
<tr>
<td colspan="3">
<img src="../images/IASSIGNATER.jpg" style="margin: -18px 15px -86px 0; float: right;"
alt="sigen" />
<span style="float: right; padding: 5px 20px 5px 0;">CONVENER</span>
</td>
</tr>
</table>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-advance" style="width: 75%;
margin: auto;">
<tr>
<td colspan="4">
<div class="form-actions top">
<div class="row" style="margin-left: 260PX;">
<div class="col-md-offset-3 col-md-9">
<button class="btn blue" type="button" onclick="printContent('div1')" style="width: 60px;">
</button>
<asp:LinkButton ID="btnback" class="btn green" runat="server" CommandName="Cancelprint"
OnCommand="btnCancel_Click">Cancel</asp:LinkButton>
</div>
</div>
</div>
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
</form>
code for cs file
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ClearData();
mvStudentdetails.ActiveViewIndex = 0;
}
}
protected void lnkPost_Command(object sender, CommandEventArgs e)
{
if (e.CommandName == "PostData")
{
try
{
if (txtAadharcardnumber.Value == "")
{
txtAadharcardnumber.Focus();
}
else
{
ViewSTUdentIDcarddtls();
// mvStudentdetails.ActiveViewIndex = 1;
}
}
catch (Exception ex)
{
}
}
}
private void ViewSTUdentIDcarddtls()
{
try
{
ClsBONTRVidyonnathiPlus objUserdtls = new ClsBONTRVidyonnathiPlus();
objUserdtls.AadhaarCardNumber = Convert.ToString(txtAadharcardnumber.Value);
objUserdtls.spType = "G";
DataSet ds = objUserdtls.FetchNTRVidyonnathiPlusformsBySpType();
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
imgpo.ImageUrl = "~/Documents/" + ds.Tables[0].Rows[0]["Photograph"].ToString();
Imagesignature.ImageUrl = "~/Documents/" + ds.Tables[0].Rows[0]["ST_Signature"].ToString();
lblName.Text = ds.Tables[0].Rows[0]["CandidatenamewithSurname"].ToString();
//DateTime Fromdate = DateTime.Parse(ds.Tables[1].Rows[0]["DateofBirth"].ToString());
//string FromformattedDate = Fromdate.ToString("dd-MM-yyyy");
lblMobileno.Text = ds.Tables[0].Rows[0]["MobileNumber"].ToString(); ;
//lblBatch.Text = ds.Tables[1].Rows[0]["FatherName"].ToString();
// lblCourse.Text = ds.Tables[1].Rows[0]["Coursename"].ToString();
lblCategory.Text = ds.Tables[0].Rows[0]["Category"].ToString();
lblIdno.Text = ds.Tables[0].Rows[0]["Application_No"].ToString();
lblFathername.Text = ds.Tables[0].Rows[0]["FatherName"].ToString();
lbldoorno.Text = ds.Tables[0].Rows[0]["DoorNumber"].ToString();
lblDistrict.Text = ds.Tables[0].Rows[0]["DistrictName"].ToString();
lblState.Text = ds.Tables[0].Rows[0]["StateName"].ToString();
mvStudentdetails.ActiveViewIndex = 1;
ClearData();
// lblValidity.Text = ds.Tables[1].Rows[0]["Validity"].ToString();
}
else
{
ClearData();
lblErrormsg.Text = "Sorry,Your Record Not Found,Please Register NTR Vidyonnathi Plus";
mvStudentdetails.ActiveViewIndex = 0;
}
}
}
catch (Exception ex)
{
}
}
public void ClearData()
{
txtAadharcardnumber.Value = "" ;
lblErrormsg.Text = "";
}
protected void btnback_Click(object sender, CommandEventArgs e)
{
if (e.CommandName == "back")
{
ClearData();
Response.Redirect("~/NTRVidyonnathiPlusApplication.aspx", true);
}
}
protected void btnCancel_Click(object sender, CommandEventArgs e)
{
if (e.CommandName == "Cancelprint")
{
try
{
ClearData();
mvStudentdetails.ActiveViewIndex = 0;
}
catch (Exception ex)
{ }
}
}
No comments:
Post a Comment