C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Auto Refresh update panel on page using Timer


Posted Date: 04 Oct 2008    Resource Type: Code Snippets    Category: ASP.NET WebForms

Posted By: Sujit Kumar       Member Level: Gold
Rating:     Points: 10



This code shows how to refresh update panel using timer in asp.net

private void BindGridView()
{
string connectionString = @”Server=sujitkumar\sqlexpress;Database=pubs;uid=sa;pwd=1234;”;

SqlConnection conn = new SqlConnection(connectionString);
SqlDataAdapter ad = new SqlDataAdapter(”SELECT * FROM names”, conn);

DataSet ds = new DataSet();
ad.Fill(ds);

gvName.DataSource = ds;
gvName.DataBind(); //gvName is Gridview
}

protected void timer1_tick(object sender, EventArgs e)
{
BindGridView()
up1.Update(); //up1 is updatepanel object.
}


For more details, visit http://sujitkumar.wordpress.com




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Update panel  .  Timer  .  Auto Refresh update panel on page using Timer  .  Asp.net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: dd\MM\yyyy format for Calendar Control
Previous Resource: Opening a popup on click of a rabiobuttonlist
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET WebForms


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

UK Conference calling Company

Contact Us    Privacy Policy    Terms Of Use