.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 an control area?

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :Windows Application
Sorry, I'm missing something. I've got a Form, a Panel on it and another Panel on that Panel. So when i move child Panel2 on the Panel1 (Top+=10) - it disappears. I'm trying to Refresh() everything - Form, Panel1,Panel2, but it doen't help. Please, tell me, what do i missing?

View Complete Post

More Related Resource Links

How to refresh WPF window NonClient Area

Hi Buds,     How we can refresh WPF window Non client area after done the ExtendFrame through Window Interop services??? I have extended the Window framework by the follwoing snippets. I need to refresh the whole window after this operation..  having any idea????? DwmExtendFrameIntoClientArea(hWnd,ref pMargins);        Regards, Suresh

Refresh CollectionViewSource (Entity Framework) bound control

I can't believe I can't find an answer to this... I've created Entity Framework models generated from DB (SQL Server CE) I dragged an Entity from Data Sources to my MainWindow, automagically creating this XAML: <Window.Resources>     <CollectionViewSource x:Key="contentItemsViewSource" d:DesignSource="{d:DesignInstance my:ContentItem, CreateList=True}" /> </Window.Resources> <Grid DataContext="{StaticResource contentItemsViewSource}">     <DataGrid AutoGenerateColumns="False" EnableRowVirtualization="True" Height="Auto" HorizontalAlignment="Stretch" ItemsSource="{Binding}" Margin="0,22" Name="contentItemsDataGrid" RowDetailsVisibilityMode="VisibleWhenSelected" VerticalAlignment="Stretch" Width="Auto" DataContext="{Binding}" IsReadOnly="True" CanUserResizeRows="False">         <DataGrid.Columns>             <DataGridTextColumn x:Name="idColumn" Binding="{Binding Path=Id}" Header="Id" Width="SizeToHeader" Visibility="Hidden" />             <DataGridTex

Refresh contents of a server control


Hi. I'm developing a custom server control, which, on its RenderContents method, does some fancy work and writes content to the page via the HtmTextWriter passed to the method. My code is something like this:

protected override void RenderContents(HtmlTextWriter writer)
    writer.Write("something, say from the db");

Now, I'd like to have a method to refresh the contents of the control (let's say, go to the db again). I was thinking of calling the RenderContents method manually. The thing is that I don't know how to get the HtmlTextWriter object that my page uses so that I can pass it to the method. How would I achieve this? Would that even work, or is there a better way to do it?

Thanks a lot.

page inside update panel doesn't refresh the session object after postback of any control



I have many controls like dropdown, radiobuttonlist, etc on my page and I put all these controls inside the update panel so that the page doesn't look to be posting back when something is selected. Now the working on the page is very smooth. But the session object isn't getting refreshed even if I postback to the server and as a result even if the users are working on the page they are being sent to the login screen after 20 mins.

Is there anyway where I could put all the controls in update panel and still refresh the session after any postback(dropdown selection)

Any help is greatly appreciated.

Thanks in advance

Zooming in on specified area on a Image control.


I have an ImageControl within a Grid, that displays an image I want to be able to zoom in on the area of the image where the mouse down occured - just to make that area more visible to the user - but the image as a whole should stay the same size within the control, How would I do that, I tried applying a scaleTransform but the image did not remain the same size - any suggestion?


refresh listbox on updatepanel ajax control tool kit


Hi all, 

i have a dropdownlist and a listbox inside an update panel. I populate the listbox with a selected value of the dropdownlist and works ok. The problem is when delete an item from the listbox because does not the refresh of the listview and still to watch me the deleted item. 

how can i do the refresh?

pd: i am using framework 2.0

thx in advance!

Flickering Problem while using a Ajax Timer Control to refresh a chart control in asp.net2010

Hi Everybody ,  

I am facing a flickering issue when i am trying to refresh a chart control on the tick of a timer .I am listing

below the code of my application ,Please help me remove this problem so that chart control get refreshed without any flickers on the specified time interval

Thanks in advance.

 C# code:

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
        if (!Page.IsPostBack)
            MyLabel.Text = System.DateTime.Now.ToString();
            Txt1.Text = "Mohit";

    protected void Timer1_Tick(object sender, EventArgs e)

        Label1.Text = "Grid Refreshed at: " + DateTime.Now.ToLongTimeString();

    public void BindData()
        DateTime st = new DateTime(2010, 6, 1);
        int dys = 12;
        Dictionary<DateTime, long> dict = GetData(st, dys);

        foreach (DateTime d in dict.Keys)
            string xlab = d.ToString("M/d");

            DayOfWeek wd = d.DayOfWeek;
            if (wd == DayOfWeek.Sunday || wd == DayOfWeek.Saturday)
                Chart1.Series["weekends"].Points.AddXY(xlab, dict[d]);

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

In-Depth look at the GridView Control

In the last article we looked at few of the new controls available in Asp.net 2.0. We also talked about Grid View Control which has replaced the Asp.net 1.1 DataGrid control for good. In this article we will examine more features of the Grid View control. In this article we will see some of the common operations that can be performed using the GridView control. Apart from these operations there are many more functions that can be performed on the control and which we will see in the later articles

ASP.NET repeater control - databind with style

even used the inline editing features, which I at the time thought was the coolest way possible to write ASP.NET code ( I managed to write code to hide all other rows and only show the current one - the row being edited). With a nice looking EditTemplate it looked indeed very slick but it really turned into giant and hard to manage code behind files.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Using TemplateFields in the GridView Control

The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a checkbox whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data field value can be rendered using the HyperLinkField and ButtonField field types.

How To Add calendar control inside a GridView

This article show hot to add calendar control inside a GridView with code in c#

Using ATLAS PopUp Control with Calendar inside the GridView Control

In this video tutorial Mohammad demonstrates how you can access the Calendar control which is displayed using the ATLAS PopUp control inside the GridView control.

GridView control to show master-child or master-slave data, written in c#, asp.net

I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Easily manipulate data with the GridView control in ASP.NET 2.0

Last week, I introduced ASP.NET 2.0's GridView data control and covered the basics of using it. This week, I go a step further by going into the details of working with the data contained in the control. This includes viewing, editing, and deleting data. Thankfully, the GridView control makes it easy to utilize these features. Before diving into these topics, I begin with an examination of the different field types supported by the GridView control.
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