Code to add background color or background image:- Frontend:- <html> <head> <title></title> </head> <body id="bgBody" runat="server"> </body> </html> C# apply in any method:- // Background color code bgBody.Attributes["bgcolor"] = "#cc0000"; //background image code bgBody.Attributes.Add("background", "images/fullbg.jpg");
Posts
Showing posts from March, 2013
- Get link
- X
- Other Apps
How to insert multiple rows from c# table to sql database table:- Frontend: <asp:Button ID="Button2" runat="server" Text="Create Table" onclick="Button2_Click" /> <asp:GridView ID="gveg" runat="server"> </asp:GridView> Backend C#: protected void Button2_Click(object sender, EventArgs e) { // // Here we create a DataTable with four columns. // DataTable temptable = new DataTable(); temptable.Columns.Add("ProductID", typeof(string)); temptable.Columns.Add("RelatedProductID", typeof(string)); ...