User login

.net

Add a Select All CheckBox to Table with CheckBoxes

If you have a GridView with multiple selection checkboxes you may want to add a 'Select All' checkbox in the header row to select or clear all checkboxes at once.
To accomplish this, you could use the following technique. First, add the following statement your asp code:

<asp:TemplateField HeaderText="Select">
<HeaderTemplate>
<asp:CheckBox runat="server" ID="cbAll" onclick="selectAllCheckboxes(this);"/>
</HeaderTemplate>
....
</asp:TemplateField>

A GridView with a Multiple Selection CheckBox

Create Hypelinked Rows in GridView

Let's say you have a GridView, and you want to have a hyperlink in each row that will supply parameters to a url based on some values in the selected row. We can use one of the two controls to accomplish this task - a HyperLink or a LinkButton.

HyperLink

This is how you do it with a HyperLnk control.

First, we build a GridView:

<asp:GridView ID="gv1" runat="server" BorderWidth="0" AutoGenerateColumns="False" OnRowDataBound="gv1_RowDataBound"
ShowHeader="False">

Format Numbers With Thousand Separators on a .NET page

This article will show you how to display and edit numbers with thousand separators on .NET page.

Syndicate content