SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have developed a small application in SharePoint. I am using custom application page and load .ascx Control over that page under Page_Load() method. In .ascx Control, I have created a small form with text boxes and a button Control. under this button click event, I want to change the text property of label like: lblConfirmation.Text = "Confirmation is OK"; but it did not change the text. It shows nothing because i set text property empty in label Control.

<asp:Label ID="lblConfirmation" runat="server" Text="" ></asp:Label>

Any Idea, what is wrong ?

share|improve this question
Can you please share your PageLoad event code...? – Arsalan Adam Khatri Dec 12 '12 at 18:48

Probably you need to check if it's a real postback or a first page load in your Page_Load() method... like this

    // code to only run at first page load here 

Otherwise you will initiate the label.Text to an empty string on each postback of the page and the page will be (more or less) static.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.