Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
sir,
how to AdRotator control use and Display the total values in Grid view.
Thank You.
Posted
Updated 3-Apr-12 4:48am
v2
Comments
ZurdoDev 3-Apr-12 10:49am    
This question does not make sense. An Ad Rotator rotates through ads or images, for example. How does that relate to your gridview? Please explain more clearly.

Add an AdRotator Control to a Web Form

1.View the Default.aspx Web Form in Visual Studio.
2.Drag an AdRotator control from the Web Forms section of the toolbox onto the Default.aspx Web Form.
3.Position the AdRotator control near the top center of the Web Form, and resize it so that it is the same size as the images that you created earlier. (To control the size more accurately, set the Height and Width properties).
4.Click AdRotator1 (the newly added AdRotator control), and then press the F4 key to view its properties.
5.Set the AdvertisementFile property to Adverts.xml.
6.Save Default.aspx, and build the project.
 
Share this answer
 
To display the total values in Grid view at footer

C#
public int gettotal()
  {   
     SqlConnection conn = new SqlConnection("connectionstring");
     conn.Open();
     SqlCommand cmd = new SqlCommand("SELECT SUM(salary) FROM emp", conn);
     int totalsal = Convert.ToInt32(cmd.ExecuteScalar());
     return totalsal;
  }
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900