I am customizing the account registration section of a new VS 2013 web application which comes with bootstrap css format. I am trying to build a form on a page and cannot get one section to display inline instead of block. Latest try is below.
<div class="form-group">
<asp:Label runat="server" AssociatedControlID="ddlCountry" CssClass="col-md-2 control-label">Country</asp:Label>
<div class="col-md-10">
<asp:DropDownList runat="server" ID="ddlCountry" CssClass="form-control" Width="200" />
<div class="form-group">
<asp:Label runat="server" AssociatedControlID="tbPostalCode" CssClass="col-md-2 control-label">Postal Code</asp:Label>
<div class="col-md-10-inline">
<asp:TextBox runat="server" ID="tbPostalCode" CssClass="form-control" Width="200" MaxLength="10" Height=" " />
<asp:RequiredFieldValidator runat="server" ControlToValidate="ddlCountry"
CssClass="text-danger" ErrorMessage="The country field is required." />
<asp:RequiredFieldValidator runat="server" ControlToValidate="tbPostalCode"
CssClass="text-danger" ErrorMessage="The postal code field is required." />
</div>
</div>
</div>
</div>
This is how everything I try to get it to display inline ends up looking like
I want the Postal Code label and text box to display on same line as Country. Normally an easy task but bootstrap clearing getting in the way
what i did to achieve this is wrote each form controls in a separate row. ie,
<form role="form">
<div class="row">
<div class="col-lg-12">
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="form-group">
<label for="fname">First Name</label>
<input type="text" class="form-control" id="fname" placeholder="Enter email">
</div>
</div>
<div class="col-lg-6">
<div class="form-group">
<label for="lname">Last Name</label>
<input type="text" class="form-control" id="lname" placeholder="Enter Last Name">
</div>
</div>
</div>
</form>
In the above code, First Name and Last Name elements will be shown in a same line,
I don't know whether its right way or not but it worked for me.
check it here http://ezmotionq.com/registration
Related
I have a page with 3 fields on it. An amount (textbox), a payment terms (dropdown) (once, montly, quarterly, etc.) and an amount to be charged based on what is selected in the dropdown. The dropdown is set to autopostback=true. The operation works to calculate the amount to be charged, but pops back to the top of the page during postback. I know I need an updatepanel to do a partial postback, I just can't figure out how to code it or where to put it in my code. The attempts I have made seem to swallow the postback, and nothing happens.
This is the code without the updatepanel:
<div class="row form-group">
<label class="control-label col-md-4" for="lblTotal">Total Amount:<asp:textbox ID="lblTotal" runat="server" visible="true" borderstyle="None" ForeColor="#FFFFFF" BackColor="#FFFFFF"/></label>
<div class="col-md-3 "><div class="input-group"><span class="input-group-addon" id="lblDollar" style="border-color:#4B116F; border-width:2px; color:#4B116F;">$</span>
<asp:textbox ID="lblTotalAmount" Runat="server" Font-Bold="true" ReadOnly="false" class="form-control" aria-describedby="lblDollar" style="border-color:#4B116F; border-width:2px; color:#4B116F;" AutoPostBack="false"/></div></div>
<div class="col-md-3"><asp:rangeValidator id="rvalTotalAmount" ControlToValidate="lblTotalAmount" runat="server" type="Double" Minimumvalue="5.00" Maximumvalue="30000.00" ErrorMessage="For your security we limit online gifts to a range of $5.00 to $30,000.00." Text="*"></asp:rangeValidator><asp:CustomValidator ID="cvalDesignation" runat="server" errormessage="Please enter a designation." Text="*"/></div>
</div>
<div class="row form-group">
<label class="control-label col-md-4">Payment Terms: </label>
<div class="col-md-3">
<asp:DropDownList ID="ddlCCFrequency" Runat="server" class="ddl_styler_combo ddl-size dropdown-toggle" AutoPostBack="true" style="border-radius:4px; width:160px;"/>
</div>
<asp:TextBox ID="tbxAuthNetAmt" runat="server" visible="true" borderstyle="solid" ForeColor="#FFFFFF" BackColor="#FFFFFF"/>
</div>
<div class="row form-group">
<label class="control-label col-md-4">Card will be charged: </label>
<div class="col-md-3"><div class="input-group">
<span class="input-group-addon ddl_styler_combo" id="ccDollar" style="border-color:#4B116F; border-width:2px; color:#4B116F; font-weight:bold; height:33px;">$</span>
<asp:TextBox ID="tbxCardAmount" readonly="false" Runat="server" class="form-control ddl_styler_combo ddl-size" aria-describedby="ccDollar" style="border-color:#4B116F; border-width:2px; color:#4B116F; border-bottom-right-radius:4px; border-top-right-radius:4px;" />
</div></div>
<div class="col-md-2"><asp:CustomValidator id="cvalCardChargeSchedule" runat="server" enabled="true" ErrorMessage="Please specify a billing schedule" /></div>
</div>
"The attempts I have made seem to swallow the postback"
when this is happens its means that you have JavaScript errors.
From this code only the validator's can cause JavaScript errors - Remove them temporary to see if UpdatePanel working, and then add one by one to locate what is going wrong.
Alternative see for javacript errors as you have the page using the Web Browser Tools.
I have a form that does not want to align itself.
I have tried to show lines how I want the alignment on the attached image, hope it helps.
I want the right hand textboxes to pull-right (as per the blue line on the image, does not work when i add it to the class), and the drop down boxes to fill so that they are the same size as the textboxes (as per the green lines on the image).
Code below :)
<div class="container" style="margin-top: 75px;">
<div class="row">
<div class="col-md-5" style="padding-bottom: 50px;">
<h2>Ansök nu och spara tusentals kronor</h2>
Fyll i dina uppgifter och jämför lån från Sveriges ledande banker. Du kan låna upp till 500 000kr från 3,5% i ränta.<br />
<br />
Endast en kreditupplysning görs genom Conteo, men sin ansökan om lån skickas till alla våra samarbetsbanker. En budgivning mellan bankerna påbörjas och du får resultatet inom 24 timmar.
</div>
<div class="col-md-2">.col-md-2</div>
<div class="col-md-5">
<div class="loan-form">
<h3>Hur mycket vill du låna?</h3>
<div>
<b>Lånebelopp</b><span class="pull-right"><span style="font-weight: bold;" id="loanamount">100 000</span> kr</span><br />
<div id="mainloan_slider"></div>
</div>
<br />
<br />
<div>
<b>Återbetalningstid</b><span class="pull-right"><span style="font-weight: bold;" id="repaymenttime">8</span> år</span><br />
<div id="repaymenttime_slider"></div>
</div>
<br />
<hr style="background-color: #E6C485; height: 2px;" />
<div class="form-inline">
<div class="form-group row">
<div class="col-md-6">
<asp:TextBox ID="txtFirstname" runat="server" CssClass="form-control loan-form-textbox" placeholder="förnamn"></asp:TextBox>
</div>
<div class="col-md-6">
<asp:TextBox ID="txtLastname" runat="server" CssClass="form-control loan-form-textbox pull-right" placeholder="efternamn"></asp:TextBox>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-md-6">
<asp:TextBox ID="TextBox3" runat="server" CssClass="form-control loan-form-textbox" placeholder="personnummer"></asp:TextBox>
</div>
<div class="col-md-6">
<asp:TextBox ID="TextBox4" runat="server" CssClass="form-control loan-form-textbox pull-right" placeholder="email"></asp:TextBox>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-sm-6">
<asp:TextBox ID="TextBox1" runat="server" CssClass="form-control loan-form-textbox" placeholder="hemnummer"></asp:TextBox>
</div>
<div class="col-sm-6">
<asp:TextBox ID="TextBox2" runat="server" CssClass="form-control loan-form-textbox pull-right" placeholder="mobilnummer"></asp:TextBox>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-sm-6">
<asp:DropDownList ID="ddCivilstand" runat="server" CssClass="form-control loan-form-textbox">
<asp:ListItem Text="Gift" Value="1"></asp:ListItem>
<asp:ListItem Text="Singel" Value="2"></asp:ListItem>
<asp:ListItem Text="Skild" Value="3"></asp:ListItem>
<asp:ListItem Text="Änka/Änkeman" Value="4"></asp:ListItem>
<asp:ListItem Text="Separerad" Value="5"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-sm-6">
<asp:DropDownList ID="ddEmploymentType" runat="server" CssClass="form-control loan-form-textbox">
<asp:ListItem Text="Annat" Value="0"></asp:ListItem>
<asp:ListItem Text="Fast anställd" Value="1"></asp:ListItem>
<asp:ListItem Text="Egen företagare" Value="2"></asp:ListItem>
<asp:ListItem Text="Visstidsanställd" Value="3"></asp:ListItem>
<asp:ListItem Text="Pensionär" Value="4"></asp:ListItem>
<asp:ListItem Text="Student" Value="5"></asp:ListItem>
<asp:ListItem Text="Arbetslös" Value="6"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-sm-6">
<asp:DropDownList ID="ddChildren" runat="server" CssClass="form-control loan-form-textbox">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
<asp:ListItem Text="4" Value="4"></asp:ListItem>
<asp:ListItem Text="5" Value="5"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-sm-6">
<asp:DropDownList ID="ddAccomnodationType" runat="server" CssClass="form-control loan-form-textbox">
<asp:ListItem Text="Annat" Value="1"></asp:ListItem>
<asp:ListItem Text="Hyresrätt" Value="2"></asp:ListItem>
<asp:ListItem Text="Bostadsrätt" Value="3"></asp:ListItem>
<asp:ListItem Text="Inneboende" Value="4"></asp:ListItem>
<asp:ListItem Text="Villa/Radhus" Value="5"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-md-6">
<asp:TextBox ID="TextBox5" runat="server" CssClass="form-control loan-form-textbox" placeholder="boendekostnad"></asp:TextBox>
</div>
<div class="col-md-6">
<asp:Button ID="btnApply" runat="server" Text="Ansök nu" CssClass="btn btn-primary pull-right" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Bootstrap columns have padding on right and left sides, this means that aligning to the right will not be at the edge. to align to the right edge, add style="padding-right: 0;" to elements you need pulled right (it would be better if you use a class rather than inline code .col-pull-right{padding-right: 0;}
The box sizing problem should be solved by removing form-inline class at
<div class="form-inline">
Here the full code. Note i have used final html elements for the code above.
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
<div class="container" style="margin-top: 75px;">
<div class="row">
<div class="col-md-5" style="padding-bottom: 50px;">
<h2>Ansök nu och spara tusentals kronor</h2>
Fyll i dina uppgifter och jämför lån från Sveriges ledande banker. Du kan låna upp till 500 000kr från 3,5% i ränta.<br />
<br />
Endast en kreditupplysning görs genom Conteo, men sin ansökan om lån skickas till alla våra samarbetsbanker. En budgivning mellan bankerna påbörjas och du får resultatet inom 24 timmar.
</div>
<!-- can be replaced by col-md-offset-2 on element below it -->
<div class="col-md-2">.col-md-2</div>
<div class="col-md-5">
<div class="loan-form">
<h3>Hur mycket vill du låna?</h3>
<div>
<b>Lånebelopp</b><span class="pull-right"><span style="font-weight: bold;" id="loanamount">100 000</span> kr</span><br />
<div id="mainloan_slider"></div>
</div>
<br />
<br />
<div>
<b>Återbetalningstid</b><span class="pull-right"><span style="font-weight: bold;" id="repaymenttime">8</span> år</span><br />
<div id="repaymenttime_slider"></div>
</div>
<br />
<hr style="background-color: #E6C485; height: 2px;" />
<!-- remove class form-inline from here -->
<!--<div class="form-inline"> -->
<div>
<div class="form-group row">
<div class="col-md-6">
<input ID="txtFirstname" class="form-control loan-form-textbox" placeholder="förnamn"/>
</div>
<div class="col-md-6">
<input ID="txtLastname" class="form-control loan-form-textbox pull-right" placeholder="efternamn"/>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-md-6">
<input ID="TextBox3" class="form-control loan-form-textbox" placeholder="personnummer"/>
</div>
<div class="col-md-6">
<input ID="TextBox4" class="form-control loan-form-textbox pull-right" placeholder="email"/>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-sm-6">
<input ID="TextBox1" class="form-control loan-form-textbox" placeholder="hemnummer"/>
</div>
<div class="col-sm-6">
<input ID="TextBox2" class="form-control loan-form-textbox pull-right" placeholder="mobilnummer"/>
</div>
</div>
<div class="form-group row" style="margin-top:25px; padding-right: 0">
<div class="col-sm-6">
<select ID="ddCivilstand" class="form-control loan-form-textbox">
<option value=""> Gift</option>
<option value=""> Singel</option>
<option value=""> Skild</option>
<option value=""> Änka/Änkeman</option>
<option value=""> Separerad</option>
</select>
</div>
<div class="col-sm-6">
<select ID="ddEmploymentType" class="form-control loan-form-textbox">
<option value=""> Annat</option>
<option value=""> Fast anställd</option>
<option value=""> Egen företagare</option>
<option value=""> Visstidsanställd</option>
<option value=""> Pensionär</option>
<option value=""> Student</option>
<option value=""> Arbetslös</option>
</select>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-sm-6">
<select ID="ddChildren" class="form-control loan-form-textbox">
<option value=""> 1</option>
<option value=""> 2</option>
<option value=""> 3</option>
<option value=""> 4</option>
<option value=""> 5</option>
</select>
</div>
<div class="col-sm-6">
<select ID="ddAccomnodationType" class="form-control loan-form-textbox">
<option value=""> Annat</option>
<option value=""> Hyresrätt</option>
<option value=""> Bostadsrätt</option>
<option value=""> Inneboende</option>
<option value=""> Villa/Radhus</option>
</select>
</div>
</div>
<div class="form-group row" style="margin-top:25px;">
<div class="col-md-6">
<input ID="TextBox5" class="form-control loan-form-textbox" placeholder="boendekostnad"/>
</div>
<div class="col-md-6">
<button ID="btnApply" class="btn btn-primary pull-right">Ansök nu</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
I have an online banking login that I'm trying to take from an old client site and put on their new site. If I copy the form and paste it into my new site, it just reloads the page when submitted. I've tried to change it to an asp.net form using the appropriate and other applicable tags with the same result.
If I take the form and put it in a simple index.html file, it submits and takes me to the correct external site.
I was unable to set the ID & values with the asp.net form and that may be one of the issues.
Any help is appreciated.
Here is the HTML form version that works in .html page that needs to work in .aspx page:
<form action="some external site" method="POST" autocomplete="OFF" target="_top">
<input type="hidden" name="sssid" value="my value">
<input type="hidden" name="iid" value="another value">
<div class="field-container">
<label for="aid" id="aid-label">Access ID</label>
<input name="aid" id="aid" type="text" size="8" onFocus="toggle_label(this, 'focus');" onBlur="toggle_label(this,'blur');" />
</div>
<div class="field-container">
<label for="passcode" id="passcode-label">Passcode</label>
<input name="passcode" id="passcode" type="password" size="8" onFocus="toggle_label(this, 'focus');" onBlur="toggle_label(this,'blur');"/>
</div>
<div class="form-row">
<input type="submit" name="Submit" value="Go" class="button">
</div>
</form>
Here is my asp.net form version that I tried:
<form action="some external site" method="POST" autocomplete="OFF" target="_top">
<input type="hidden" name="sssid" value="some value">
<input type="hidden" name="iid" value="another value">
<asp:TextBox runat="server" ID="sssid" CssClass="form-control" type="hidden" ClientIDMode="Static"></asp:TextBox>
<asp:TextBox runat="server" ID="iid" CssClass="form-control" type="hidden" ClientIDMode="Static"></asp:TextBox>
<div class="form-group">
<asp:Label runat="server" id="lblAccessID"></asp:Label>
<asp:TextBox runat="server" ID="txtAccessID" CssClass="form-control"> </asp:TextBox>
</div>
<div class="form-group">
<asp:Label runat="server" id="lblPassCode"></asp:Label>
<asp:TextBox runat="server" ID="txtPasscode" CssClass="form-control" TextMode="Password"></asp:TextBox>
</div>
<button type="submit" class="btn btn-blue">GO
<img src="/Content/img/icon-sm-arrow.png" alt="" />
</button>
</form>
My asp.net form code behind:
protected void Page_Load(object sender, EventArgs e)
{
txtAccessID.Attributes.Add("placeholder", "Access ID");
txtPasscode.Attributes.Add("placeholder", "Passcode");
}
I had to use the following to post this correctly:
<asp:LinkButton runat="server" ID="btnSubmit" CssClass="btn btn-blue" PostBackUrl="urlhere" Text='GO <img src="/Content/img/icon-sm-arrow.png" alt="" />' />
set PostBackUrl property of Button control => https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.button.postbackurl(v=vs.110).aspx
the reason webforms always posting it 2 itself may be due to their __doPostBack script.
I am trying to click on an ASP:Button with an onclick function. Every time I do that the HTML5 Required stops the click from occurring. I even tried to include an ASP:UpdatePanel but that does not work neither.
<form id="form1" name="theform" class="form-horizontal" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="fb_login" runat="server">
<asp:button CssClass="btn-facebook" ID="FacebookButton" Text="Login with Facebook" OnClick="FacebookButton_Click" runat="server" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="container">
<div class="form-group">
<label for="FirstName">First Name</label>
<div>
<input type="text" tabindex="1" class="form-control" id="FirstName" required title="Enter First Name" runat="server" placeholder="First Name">
</div>
</div>
<div class="form-group">
<label for="LastName">Last Name</label>
<div>
<input type="text" tabindex="2" class="form-control" id="LastName" required title="Enter Last Name" runat="server" placeholder="Last Name">
</div>
</div>
<div class="form-group">
<div>
<button type="submit" class="btn btn-primary">Submit Information</button>
</div>
</div>
</div>
</form>
Remove the UpdatePanel and set UseSubmitBehavior="false" on FacebookButton:
<asp:button UseSubmitBehavior="false" CssClass="btn-facebook" ID="FacebookButton" Text="Login with Facebook" OnClick="FacebookButton_Click" runat="server" />
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
This is my Text File
R3073101.txt
3070004626!#!JAVEED BASHIR BURZA###BASHIR BURZA###502 BLUE BELLS FLOWER VALLEY NEAR###PAYYEDE HOTEL NAYA NAGAR###MIRA ROAD EAST THANE###401107###502 BLUE BELLS FLOWER VALLEY NEAR###PAYYEDE HOTEL NAYA NAGAR###MIRA ROAD EAST THANE###401107###1###1###N###15###114###FORD FIGO 1 4 EXI###4###1399###5###0###1525###0###2###MAJ1XXMRJ1DU78421###MAJ1XXMRJ1DU78421###C01###K BLUE###1###2014###1/30/2029###307###1###O######PV######541137#########1/31/2014###0###1399###0###0###0###0#####################1/31/2014######################################################################################################################################################################################################NE###1###1/31/2014###1/30/2015###71050131130100129567###HP><401107><1/31/2014###
3070004627!#!SAJID PERVEZ###ALEY AHMED###1005/6 10TH FLR MEGHDOOT A 121###LOKHANDWALA COMPLEX###ANDHERI WEST MUMBAI###400053###1005/6 10TH FLR MEGHDOOT A 121###LOKHANDWALA COMPLEX###ANDHERI WEST MUMBAI###400053###1###1###N###15###114###FORD ECOSPORT 1 5 P TITA AT###4###1499###5###0###1700###0###1###MAJAXXMRKAEL12244###MAJAXXMRKAEL12244###C01###D WHITE###1###2014###1/30/2029###307###N###O######PV######952517#########1/31/2014###0###1499###0###0###0###0#####################1/31/2014######################################################################################################################################################################################################IL###1###1/31/2014###1/30/2015###I24131022###
3070004628!#!ABRAR MALIK###SARDAR MALIK###A/703 PANCHTANTRA APT-II###PANCH MARG VERSOVA###MUMBAI###400061###A/703 PANCHTANTRA APT-II###PANCH MARG VERSOVA###MUMBAI###400061###1###1###N###15###114###FORD ECOSPORT 1 5 P AMB MT###4###1499###5###0###1700###0###1###MAJAXXMRKAEL15204###MAJAXXMRKAEL15204###C01###D WHITE###1###2014###1/30/2029###307###1###O######PV######653670#########1/31/2014###0###1499###0###0###0###0#####################1/31/2014######################################################################################################################################################################################################IL###1###1/31/2014###1/30/2015###PS11225946###HP><400059><1/31/2014###
3070004629!#!A V B AMARAN###BABU ANTHONY CHETTY###B/203 DRONAGIRI MODERN USHA COLONY###EVERSHINE NAGAR MALAD WEST###MUMBAI###400064###B/203 DRONAGIRI MODERN USHA COLONY###EVERSHINE NAGAR MALAD WEST###MUMBAI###400064###1###1###N###15###114###FORD ECOSPORT 1 5 P AMB MT###4###1499###5###0###1700###0###1###MAJAXXMRKAEL15207###MAJAXXMRKAEL15207###C01###M SILVER###1###2014###1/30/2029###307###1###O######PV######653670#########1/31/2014###0###1499###0###0###0###0#####################1/31/2014######################################################################################################################################################################################################NE###1###1/31/2014###1/30/2015###71050131130100129516###HP><3RD FLR A-WING TRADE STAR BLDG><400059><1/31/2014###
3070004630!#!NAROTTAM KUMAR SHARMA###PARMANAND SHARMA###103-B ASTER TOWER FILM CITY ROAD###FILM CITY ROAD MALAD EAST###MUMBAI###400097###103-B ASTER TOWER FILM CITY ROAD###FILM CITY ROAD MALAD EAST###MUMBAI###400097###1###1###N###15###114###FORD ECOSPORT 1 0 P TITA MT###4###999###5###0###1700###0###1###MAJAXXMRKAEL17257###MAJAXXMRKAEL17257###C01###CHILL###1###2014###1/30/2029###307###1###O######PV######895890#########1/31/2014###0###999###0###0###0###0#####################1/31/2014######################################################################################################################################################################################################IL###1###1/31/2014###1/30/2015###I-24134004###HP><400098><1/31/2014###
my .aspx code
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div align="left">
<h3>
<b>New Customer </b>
</h3>
</div>
<br />
<div class="form-horizontal">
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Date</label>
<div class="col-sm-6">
<div class="input-group date" data-date="12-02-2012" data-date-format="mm-dd-yyyy" id="datetimepicker1">
<asp:TextBox ID="TextBox1" class="span2" runat="server" Placeholder="Enter Date" CssClass="form-control"></asp:TextBox>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar">
</span>
</span>
</div>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Date Required"
ControlToValidate="TextBox1" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Customer Name</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox2" runat="server" Placeholder="Enter Name" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Customer Name Required"
ControlToValidate="TextBox2" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Regn No</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox3" runat="server" Placeholder="Enter Regn No" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Regn No Required"
ControlToValidate="TextBox3" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Imv</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox4" runat="server" Placeholder="Enter Imv" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ErrorMessage="IMV Required"
ControlToValidate="TextBox4" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Registration Cho</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox5" runat="server" Placeholder="Enter Registration Cho" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Registration CHO Required"
ControlToValidate="TextBox5" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Crtem Fees</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox6" runat="server" Placeholder="Enter Crtem Fees" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Crtem Fees Required"
ControlToValidate="TextBox6" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Crtem S.C</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox7" runat="server" Placeholder="Enter Crtem S.C" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Crtem S.C Required"
ControlToValidate="TextBox7" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
SOC</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox8" runat="server" Placeholder="Enter SOC" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="SOC Required"
ControlToValidate="TextBox8" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Soc S.C
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox9" runat="server" Placeholder="Enter Soc S.C" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="Soc S.c Required"
ControlToValidate="TextBox9" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Spl No.fees
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox10" runat="server" Placeholder="Enter Spl No.Fees" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="Spl No.fees Required"
ControlToValidate="TextBox10" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Spl No.s.c
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox11" runat="server" Placeholder="Enter Spl No.s.c" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="Spl No.s.c Required"
ControlToValidate="TextBox11" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Total No
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox12" runat="server" Placeholder="Enter Total No" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ErrorMessage=" Total No Required"
ControlToValidate="TextBox12" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
No.5
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox13" runat="server" Placeholder="Enter No.5" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ErrorMessage="No.5 Required"
ControlToValidate="TextBox13" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Redium
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox14" runat="server" Placeholder="Enter Redium" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ErrorMessage="Redium Required"
ControlToValidate="TextBox14" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
W.V
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox15" runat="server" Placeholder="Enter W.V" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" ErrorMessage="W.V Required"
ControlToValidate="TextBox15" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
TAX
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox16" runat="server" Placeholder="Enter TAX" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" ErrorMessage="TAX Required"
ControlToValidate="TextBox16" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Int
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox17" runat="server" Placeholder="Enter Int" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ErrorMessage="Int Required"
ControlToValidate="TextBox17" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
CF
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox18" runat="server" Placeholder="Enter CF" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator18" runat="server" ErrorMessage="CF Required"
ControlToValidate="TextBox18" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Above 10 Lacs
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox19" runat="server" Placeholder="Enter Above 10 lacs" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ErrorMessage="Above 10 Lacs Required"
ControlToValidate="TextBox19" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label for="inputEmail3" class="col-sm-2 control-label">
Total
</label>
<div class="col-sm-6">
<asp:TextBox ID="TextBox20" runat="server" Placeholder="Enter Total" CssClass="form-control"></asp:TextBox>
</div>
<div class="col-sm-4">
<asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ErrorMessage="Total Required"
ControlToValidate="TextBox20" ForeColor="Red" ValidationGroup="val1"></asp:RequiredFieldValidator>
</div>
</div>
<div class="row" style="margin-left: 0px; margin-right: 176px">
<div class="col-md-6">
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="btn btn-primary"
ValidationGroup="val1" Height="40px" Width="89px" OnClick="btnsubmit_Click" />
</div>
<div class="col-md-6">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</div>
</div>
<div class="row" style="margin-left: 0px; margin-right: 176px">
<div class="col-md-6">
<asp:Button ID="Button2" runat="server" Text="Upload" CssClass="btn btn-primary"
Height="40px" Width="89px"
onclick="Button2_Click" />
</div>
<div class="col-md-6">
<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
</div>
</div>
</div>
</asp:Content>
On the Click of update button my text boxes should get populated according to there name like for ex-: in text file it has first 3070004626=Sr.no!#!JAVEED BASHIR BURZA=name ,like javeed bashir burza should get populated to textbox1.text
Thanks in Advace.
Assuming the format of your txt Files is the same all over you can use this query in your button_Click() method:
var result = from txt in File.ReadAllLines(#"/path/to/your/file")
let column = txt.Split(new [] {'!', '#','#'}).Where (t => t.Length > 0 )
select column.Skip(1).FirstOrDefault();
//Output: JAVEED BASHIR BURZA
textbox1.Text = result.First();
EDIT
If you need all elements and want to iterate over them use the following code:
var result = from txt in File.ReadAllLines(#"/path/to/your/file")
let column = txt.Split(new [] {'!', '#','#'}).Where (t => t.Length > 0 )
select column;
foreach (var element in result)
{
Console.WriteLine(element);
}