.Grid { border: solid 1px #FFFFFF; }
.Grid td
{
border: solid 1px #FFFFFF;
margin: 1px 1px 1px 1px;
padding: 1px 1px 1px 1px;
text-align: center;
}
.GridHeader
{
font-weight: bold;
background-color: #8b8dbb;
}
.GridItem
{
background-color: #e6e6e6;
}
.GridAltItem
{
background-color: white;
}
<asp:GridView ID=”grdPermitRequest” runat=”server” AutoGenerateColumns=”False” DataSourceID=”srcPermitRequest” Width=”100%” CssClass=”Grid”>
<HeaderStyle CssClass=”GridHeader”></HeaderStyle>
<AlternatingRowStyle CssClass=”GridAtlItem”/>
</asp:GridView>
Archive for October, 2006
css for asp:GridView
Posted in C#.NET, tagged asp:GridView on October 18, 2006 | 11 Comments »
CSS for ASP:HyperLink
Posted in C#.NET, tagged ASP:HyperLink on October 18, 2006 | Leave a Comment »
.WhiteLink
{
color:#FFFFFF;
text-decoration: none;
font-weight:bold;
}
.WhiteLink:hover
{
background:#E6E6E6;
color:#000000;
text-decoration:none;
}
<asp:HyperLink ID=”lnkRequesList” runat=”server” NavigateUrl=”ViewRequestPage.aspx” CssClass=”WhiteLink”>Request Link</asp:HyperLink>
load dynamic user control in c#.net
Posted in C#.NET, tagged C#.net, control on October 12, 2006 | 1 Comment »
take a placeholder on your page and the write this code on your event. ctlSudentAddress ctlAddress=(ctlSudentAddress)LoadControl(“ctlSudentAddress.ascx”);
ctlAddress.showStudentAddress(ID);
PlaceHolder1.Controls.Add(ctlAddress);
Paging in DataGrid
Posted in C#.NET, tagged C#.net, datagrid on October 10, 2006 | Leave a Comment »
aspx datagrid tag
<asp:DataGrid id=”dgProducts” runat=”server” AllowPaging=”True” OnPageIndexChanged=”GridPageChange” PageSize=”4″ />
Code Base
If Not Page.IsPostBack Then
DataFiller()
End If
Sub DataFiller()
Dim strConnection As String = “data source=(local);initial catalog=University; user id=sa; password=janina;”
Dim objConnection As New SqlConnection(strConnection)
Dim strSqlProducts As String = “SELECT * FROM Users where UserName like ‘06-%’”
Dim objAdapter As New SqlDataAdapter(strSqlProducts, objConnection)
Dim objDataSet As New DataSet
objAdapter.Fill(objDataSet, “dtProducts”)
dgProducts.PagerStyle.NextPageText = “Next”
dgProducts.PagerStyle.PrevPageText = “Previous”
dgProducts.DataSource = [...]
DataBind with RadioButtonList in VB.NET
Posted in VB.NET, tagged vb.net on October 9, 2006 | Leave a Comment »
white these code to page_load so Radio Button List will be generated
Dim strConnection As String = “data source=(local);initial catalog=testDB; user id=sa; password=1234;”
Dim strSQLforListBox As String = “SELECT distinct FirstName, ID “
strSQLforListBox += “FROM Users”
Dim objConnection As New SqlConnection(strConnection)
Dim objCommand As New SqlCommand(strSQLforListBox, objConnection)
objConnection.Open()
radEmployees.DataSource = objCommand.ExecuteReader()
radEmployees.DataTextField = “FirstName”
radEmployees.DataValueField = “ID”
radEmployees.DataBind()
objConnection.Close()
Then we need to write the following [...]
SqlConnection in VB.NET
Posted in VB.NET, tagged vb.net on October 9, 2006 | Leave a Comment »
Dim strConnection As String = “data source=(local);initial catalog=testDB; user id=sa; password=1234;”
Dim objConnection As New SqlConnection(strConnection)
Dim strSQL As String = “SELECT * from tblTest;”
Dim objCommand As New SqlCommand(strSQL, objConnection)
objConnection.Open()
Response.Write(“ServerVersion: ” & objConnection.ServerVersion & _
vbCrLf & “Datasource: ” & objConnection.DataSource & _
vbCrLf & “Database: ” & objConnection.Database)
DataGrid1.DataSource = objCommand.ExecuteReader()
DataGrid1.DataBind()
objConnection.Close()
request response in vb .net
Posted in VB.NET, tagged vb.net on October 9, 2006 | Leave a Comment »
response goes like that
Response.Cookies(“name”).Value = TextBox1.TextResponse.Cookies(“pass”).Value = TextBox2.Text
Response.Redirect(“newForm.aspx”)
Request takes such way
Label1.Text = Request.Cookies(“name”).Value & ” ” & Request.Cookies(“pass”).Value

