Here download the pdf file to know the details about the new
features added in asp.net 4 and visual studio 2010.This PDF file would help you
to work with advanced feature in visual 2010..
- .ini (1)
- Ajax (8)
- Android (27)
- ASP.NET (118)
- ASP.NET errors (5)
- C# (12)
- connection string (2)
- CSS (4)
- Drupal 7 (2)
- E-Books (1)
- Error (3)
- Folder (1)
- General (22)
- google (1)
- Interview questions (5)
- LINQ (2)
- Log file (1)
- Loop (1)
- MachineLearning (3)
- news (3)
- PayPal (4)
- Read (1)
- Regex (3)
- Search a Items in Array() (1)
- SQL (10)
- Technology (5)
- vb.net (33)
- Write (1)
- XML (4)
Search This Dotnetcode
Powered by Blogger.
Categories
welcome Netizen
Share Your Knowledge.It is a way to achieve immortality
Gadget
Powered by Helplogger
Feedjit
Followers
Introduction:
In this article going to see about to display remaining
character count in multiline textbox…
Normally this method used to display the remaining character
user can able to enter in the textbox…
By limit to certain limit length, total length used to
display using this method……
Java script Code:
|
<script type="text/javascript" language="Javascript">
function textCounter(field, countfield,
maxlimit) {
if
(field.value.length > maxlimit)
field.value =
field.value.substring(0, maxlimit);
else
countfield.value="charactes left ";
countfield.value +=maxlimit -
field.value.length;
}
</script>
|
|
<div>
<asp:TextBox ID="TextBox1" runat="server" Height="100" Width="550" Wrap="true"
TextMode="MultiLine" onkeyup="textCounter(TextBox1, TextBox2,
50);"
onkeydown="textCounter(TextBox1,TextBox2, 50);" />
</div>
<div>
<asp:TextBox ID="TextBox2"
runat="server" style="color :Red;" ></asp:TextBox>
</div>
|
I hope you like these easy methods to display character
count…
Post your comments here…
Introduction:
Here you will learn to print only grid view content in asp.net
web page.
In a previous article I wrote to print a web page for you
reference I given the following below..
Some case we need to print only grid view data, In that case
we follow this method code..
Here I kept a grid view inside the panel, so when print we
call directly the panel id to print..
First :
We have to create data table to bind in grid view.
Code:
|
DataTable
dt=new DataTable();
DataRow dr;
DataRow
dr1;
dt.Columns.Add("Name");
dt.Columns.Add("mark");
for (int i
= 0; i < 5; i++)
{
dr = dt.NewRow();
dr1 = dt.NewRow();
dr["Name"] = i;
dr["mark"] = i;
dt.Rows.Add(dr);
dt.Rows.Add(dr1);
}
GridView1.DataSource = dt;
GridView1.DataBind();
|
Client side code:
|
<div>
<asp:Panel ID="Panel1" runat="server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns ="false" CssClass ="td">
<Columns >
<asp:BoundField
HeaderText ="Name" DataField ="Name"></asp:BoundField>
<asp:BoundField
HeaderText ="Mark" DataField ="Mark" />
</Columns>
</asp:GridView>
</asp:Panel>
</div>
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick ="printItn();"/>
</div>
|
Subscribe to:
Posts (Atom)
