.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to refresh C# application at run time?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application
Hi! I am developing a windows application in c#. In an entry form I have button for save to insert the data into database. When I click on save button the entered data is added to the database. In another form i have datagridview with combobox cell type and in combobox the data from database will be populated which i entered in entry form.

Now when I save a data by clicking on the save button, now if I wish to view the data in datagridview I have to close the form and again re-open it to view it. If I dont close and re-open, the newly entered data is not populated to the combo box of datagridview.

In the save button I have included refresh. But its not working.

View Complete Post

More Related Resource Links

.NET 4 Web Application Startup Time

I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.

CLR Inside Out: Improving Application Startup Time


Visual Studio is a wonderful development environment, whose IntelliSense®, integrated debugging, online help, and code snippets help boost your performance as a developer. But just because you're writing code fast doesn't mean you're writing fast code.

Claudio Caldato

MSDN Magazine February 2006

How to Keep conntion pool and application pool for certain time?


In my current system MOSS and windows 2003, I do not know where to see connection pool live time ? and Application pool live time?

How to keep live these for certain number of hours? Where can I change? Is it possible to keep minimum number of connection pool live always?


Thanks for help in advance.


Application to Constantly query Table Values and Refresh with most recent value

Hello, I must apologize in advance because I am not sure if this is the correct place for this question. I am looking for ideas on how to build an application that in the most basic sense contains a field with the most current data from a table in a SQL Server database (this would be based off of a datetime timestamp in the table). I am new to this kind of problem and am unsure where to start looking for solution ideas. The table value updates variably and could possibly update every second to every hour. I would like to design an application that would be lightweight to both the server and the user's machine. This would take the place of an unneeded report on my Reporting Services server. Any and all suggestions would be welcome because I am not sure of options I even have on this. Thanks in advance for your time and consideration, Matt

How to keep my Workflow alive only during the time my client application is running ?

Hi, I want to my workflow do some action when server  lose connection with client and at the same time client get exceptions about it. It is possible to implement some session mechanism or something like that with workflow service ? Regards Marcin

An ASP.NET 4 Web Application Using the SqlTableProfileProvider - Doable or a Time Sink?

Have hundreds of ASP.NET developers been wasting dozens of hours each on something that can't be made to work in ASP.NET? This is too weird! I've scoured the Web in vain looking for an example where someone has implemented the Microsoft SqlTableProfileProvider in an ASP.NET Web application . (The SqlTableProfileProvider  lets you store Profile data in a normal way rather than as difficult-to-manipulate blob data.) There are plenty of implementations using the Web site model, including fellow...(read more)

Why my application always complain request is time out??

Below is the configuration file, i didn`t do any modification on it. and i got a very weird situation. first my application run in this way, it was a back end library, every few second, it will send a web request to a central server for information update. but when i test it, after my back end library was launch for a while, it always complain timeout. and cannot send any message to the server. so what is wrong with my application?????  is there anything to do with the configuration file? <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <wsHttpBinding> <binding name="WSHttpBinding_IEAVService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <readerQuotas maxDepth="32" maxStringConten

SQLCE 3.5 connection from multiple application, data refresh

I have a native application (wm 6.5) using oledb to connect to a database. *******************************************************************************   result=CoCreateInstance(CLSID_SQLSERVERCE_3_5,0,CLSCTX_INPROC_SERVER,IID_IDBInitialize, (void**)&database);   ... // set properties  database->Initialize(); ******************************************************************************* This part of the app simply queries a single table for all records (query wrapped in a transaction of it own). I believe it is recommended that you keep a single connection for as long as possible, and therefore just create a new session each time I query the table. There is a second application (c#) which my application executes and then waits for. It updates and inserts new records. when the c# app closes and I get control back, my app then runs another query to see if anything has changed. My issue is that, the only way I can get the updated data is to un-initialize and re-initialize the database (IDBInitialize) interface created above.  Is there some properties I should be setting on the session/database in order for this to work. Or do I really have to spawn a new connection for every query?   Thanks in advance. Dylan

database refresh time

Hi,we have a sql server 2005...that has 70-80 databases and hundreds of tables....It is supposed to refresh every night.... refresh is done by other vendor(3rd party).... we dont know what method(technology) they use to refresh the databases....My question is .....Is there a good way to know when the last refresh has happend...can we determine it from sys tables.....the sql server is installed in window server 2003 box.... we have access to the box as well as the sql server.....plz suggest...

Client Application Services - Role service cache time out bug

Hi All, For people using Client Application Services with WPF, be aware of this bug. You can configure the "cache time out" for roles to be fetched again from the service. (In the visual studio dialog, Properties -> Services -> Advanced) This means the roles are cached on the client (in a file). If the application asks for roles again, they are not fetched again for "cache time out" time. When you set this value, it goes into your App.config, transformed into seconds. So if you choose 1 minute, the App.config has: cacheTimeout="60".   However, when using the ClientRoleProvider (for instance to do something like clientRoleProvider.GetRolesForUser("SomeUser")), this cacheTimeOut is interpreted in Minutes, not seconds! To prove my point, check ClientRoleProvider.Initialize method:   string temp = config["cacheTimeout"]; if (!string.IsNullOrEmpty(temp)) _CacheTimeout = int.Parse(temp, CultureInfo.InvariantCulture);   Later on, in ClientRoleProvider.GetRolesFromDBUser (what's in a name?), you see: _CacheExpiryDate = cd.RolesCachedDateUtc.AddMinutes(_CacheTimeout);   Testing also shows this behavior. So be aware, and always put the value in minutes in your App.Config!   Regards, Koen

Refresh time in custom webpart


Hello all,

Am developing a custom webpart for sharepoint using c#.net ,and am writing my code only in class library and deploying directly to sharepoint portal,my plm is am able to dsipaly current date and time success fully with the help of date and time functionality,like

with this am able to dsiplay current date and time but after deploying into the sharepoint portal am unable to see my time changing according to the system time i.,e time is not refreshing,please help me out from this issue!!




Application time out Error after installing SQL Server 2008 R2 64 bit + CU3


Hi all,

webapplications  are  suffering  after installing SQL Server 2008 R2 64 bit  in my mechine.

Did i have do any thjing more make the connectons(validation faster)  or SQL Server 2008 R2 behaves like that..

any idea or suggestions are appreciated.


Thanks in advacne




Refresh datagridview in windows form application


I am having a main which will have 2 controls namely treeview and datagridview . I will have a form to be opened when user selects an option from treeview. My treeview will be as follows





If i click on the text file that was child to the root i will show the content of that file. But what i need is if right click on child i will have an option as NEW and i will get a new form. If i enter some values and click on save i will save them to the text file which was provided in the treeview at the same time i would like to show the user in the datagridview when the second form gets hide. Like that i can have multiple child forms what ever data i give there in the forms that should be shown to datagridview when the child form gets closed or hide

Accessing my Web Application's database with MSSMS at the same time.



I wish to acces my database using MSSMS at the same time that I am running my web application. When I tried to access my database with MSSMS I get the following error:

Failed to retrieve data for this request (Microsoft.SqlServer. Management.SDk.Sfc)

Additional Information:

Unable to open the physical file "C:\inetpub\wwwroot\myapp\App_Data\aspnetdb.mdf".
Operationg system error 32: "32(The process cannot access the file because it is being used by another process)". (Microsoft SQL Server, Error:5120).

What can I do to being able to view my database with MSSMS at the same time?

Thanks for your help,


Web Application Load time issue


Dear All,

I have a web application that is using a single page. This page has 2 multiviews and each one of them has around 10 views. Each of the views contain a grid and a form. My main problem is that when Switching views my application takes too much time (Around 5 seconds). I am using the three tier model though, that is; I have a Busingess Logic Layer and a Data Access Layer and I am using Object Data sources.

I am so confused about the main reason for the huge load time my website requires. In addition, I am not using any images within my views which might need high load time.

Please help me out in this



How to Refresh Gridview data from update panel in specified time


hello frnds,

i have some search criteria.

after filling all criteria when i press search button the result arrives in gridview nw when searchbutton pressed after that every 20seconds i want 2 update gridview data which is in update panel

How to make the application install 1 time only



I have a need to create an applicaiton that can be installed 1 time only be a user. The user may or may not be and administrator.

How can I do this (without registry alteration if possible)?

Thanks much.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend