Responsive TextBox using Bootstrap in ASP.Net

KatieNgoc
 
on Oct 11, 2019 12:20 AM
1363 Views

how to make text or text box fit in size of iphone

Download FREE API for Word, Excel and PDF in ASP.Net: Download
pandeyism
 
on Oct 11, 2019 12:53 AM

Hi KatieNgoc,

Refer below sample.

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" />
<div class="form-group">
    <label for="inputdefault">
        Name</label>
    <input type="text" name="name" id="txtName" class="form-control" />
</div>

Demo

Refer below link for more detail about responsive textbox-

https://www.w3schools.com/bootstrap/bootstrap_forms_sizing.asp

KatieNgoc
 
on Oct 11, 2019 03:40 AM

Can I use class="form-control"  in <ASP:textbox/>

<input type="text" name="name" id="txtName" class="form-control" />

 

pandeyism
 
on Oct 11, 2019 05:19 AM

Hi KatieNgoc,

Yes it will work with asp.net control you need to write like below

<asp:TextBox runat="server" CssClass="form-control" />