.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

Modal Popup - Unable to set label text property

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net


I have ajax accordion with 6 panes with an user control inside each of it.
 In the first pane I have a form view user control and have a modalpopup to
display error message. The same method is used in all other panes.

On page load I was able to set the label text property and it properly shows in modal popup.

However whenever I do some validation and update label text property, the modal popup
shows up but the label text property is not updated. It works in all other panes.

The only difference is the user control in the pane is inside of a update panel. If I remove the

update panel every thing works fine. But I need the update panel to avoid full post back.

How do I set the label text property inside of a modal popup.

Sections of code below:




protected void Page_Load(object sender, EventArgs e)
        lblNewMessage.Text = "Error";

 protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
	 if (!doValidate() ) { return; }
    public bool doValidate()
        if (!psClassUtil.check_isnull_or_empty(firstName, 30, "N"))
            lblNewMessage.Text = "First Name is required (Maximum 30 characters)."; // does not 

View Complete Post

More Related Resource Links

overriding Text property of an inherited label



I'm writing a new control that inherits a Label.  this control is intended to maintain a fixed string value of "Text" but display whatever contracted portion of the original text will fit inside the bounds limited by this control's width.  e.g. if "Engineers are the modern wizards" doesn't fit within the width allowed the text displayed is contracted to "Enginrs ar th modrn wzrds".

public class LabelTextAdjustToSize : Label
string[] strWords;
string strSplit = " .,:;-+=-_!?";
string strVowels = "aeiouyAEIOUY";
string[] strDiphthongs = { "ae", "oi", "ou", "ie." };
public string _strText;

public override string Text

Modal popup window in ASP.Net

A Masked div or modal popup window is a child window created from the parent window which prevents the user from interacting with parent window before he returns to the parent application.

Open different page using Ajax Modal PopUp Extender Control

The article Open different page using Ajax Modal PopUp Extender Control was added by Chintan Dave on Thursday, July 15, 2010.

You May use Modal Popup Extender to open some part of the page as Popup. But there we don't have any property to open other html or aspx page in Popup window.We can do it using IFrame control. What we have to do, just add IFrame control in Panel that

want to launch modal Popup from created User Event handler




I have a create user wizard on my page and in the event handler (Created User) I get extra information from the user

via textboxes within the aspx etc.


I then do a response.redirect to another page.

What I want to happen is this


When the CreatedUser Event is fired, I  want a Modal Popup to show up with a message Processing your registration.

once the registration code is processed it will close and the users get redirected.


On my ASPX I have the Modal PopUp and a Panel.

In the code behind in the handler I put ModalPop.show()


but this does not work.


thanks for any suggestions



set an asp control property value with a label value


hi.. please help me on this

i have a control to upload multiple files on server. now i want to set the control's "upload folder"  property with a dynamic value which is different for each user..

<cc1:FileUploader ID="FileUploader1" runat="server">

                    <cc1:FileSaverAdapter FolderName= "FOLDERNAME" />


here i want this 'FolderName' value to be replaced with some label value. how can i do this ?

Thanks in advance .. :)

Unable to search Custom User Property Created in User Profiles in SharePoint 2010


Hi ,

I have created a custom user property,and created metadata property and added mapping to it, still i m not able to Search in People,Please advise

Modal Popup disappears after showing in IE7


Currently having problems with a modal popup. When you click its target control it will show up the hide itself again.  Thanks. Will try to add some more details later.

Modal Popup with UpdatePanel


Hi Guys,

              I have one Panel on ascx control to which I have attached one Modal popup extender. On this panel I have one RadioButtonList control which having SelectedIndexChanged on which I have made CheckBoxLists visible True/False. 

             I want to add Update panel to this Panel . So when I handled the SelectedIndexChanged event there should be no total page post back, only Panel updates should be happen.

 Please do reply..



Problem in Custom Control Unable to find Control To Validate Property


I make a custome control by taking a TextBox and A Regular Expression Validator.When i Use this on a .aspx page it works fine.But when i use this on .ascx page and dynamically load user control on a place holder in .aspx page it through an Error

Unable to find control id '_ctl0:txtEmail' referenced by the 'ControlToValidate' property of '_ctl0:txtEmailRequired'


My Custome control Code is this"--

public class EmailValidator:System.Web.UI.Control, INamingContainer{

private System.Web.UI.WebControls.TextBox textBox;

private System.Web.UI.WebControls.RegularExpressionValidator regularExpressionValidator;

public EmailValidator(){

textBox = new TextBox();

regularExpressionValidator = new RegularExpressionValidator();

IsErrorTextBelow = true;

IsRequired = false;

Modal Popup extender

HEllo I m using modal popup extender well i m having page on the page i m showing modal pop up extdner on click on every button but my problem is if scroll the page then modal popup extender aslo scroll till end I dont want modal popup up extender to be scoll according to page scroll can u help me pls?  

Change label text on master page from the content page.

Hello. Can I access the objects (for example change the label text) on the master page, from its contents page code? If yes, how can I approach that? Thank you Artashes

How Do I Not Include: myControl.GetType.GetProperty("Text") When No Property Window Setting?

Hi All, Posted below is code I'm using to generate a list of controls that have either a "Text" or "Caption" property. However, for certain controls in the resulting list, the property setting (Text/Caption) does not appear in the "Property Window" of the IDE when that control is selected. One example of this is the Systems.Windows.Forms.PictureBox control. Is there a way I can determine this and if so - how do I exclude these control(s) from my list?     Private Sub cmdValidateControls_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdValidateControls.Click         txtResults.Clear()         For Each ctrl As Object In Me.Controls             LogControl(ctrl)         Next     End Sub     Private Sub LogControl(ByVal ctrlIn As Object)         If System.Diagnostics.Debugger.IsAttached Then             If (Not ctrlIn.GetType.GetProperty("Text") Is Nothing) Or (Not ctrlIn.GetType.GetProperty("Caption") Is Nothing) Then                 txtRes

Sharepoint 2010 views modal popup

Hello, somebody knows how can i launch a modal popup like the normal modal popup that launch sharepoint 2010 when you try to edit or add a new item in to a list or library froma custom list view?, the thing is that i did create a listview with a freeform toolbar and all the sections (view header, view body ...) in it, and add the edit column to it because i want to edit the items from the view, in the other hand the contenttype of the list that have associate the view have its own urlforms developed with silverlight, my problem is when i try to edit the items, i clicked in the edit link column and the custom urlform added to the contentype is open in a blank page and no in the normal popups of sharepoint 2010,, if some body have had this issue i will appreciate your comments.

Modal Popup moving data from popup to parent

I have one page with a panel that makes up my ModalPopup. On the ModalPopup there is an updatepanel with a textbox and a button in it.There is a textbox on the "parent" page and I want to click the button on the modalpopup and move the data from the popup textbox to the parent textbox. So far, no joy. I have a line in the code behind to move the data between textboxes and I have also tried javascript to do the same thing but I am not able to make this happen unless i click the button twice.Any help is appreciated.

Datalist and Ajax control toolkit Modal Popup window

Hi friends I have created list of thumbnail images in datalist and on clicking image i want to pass image name to Ajax control toolkit Modal Popup window which display bigger image.   Please help me.

how to get and set radiobutton value without using text property?

I need 10 radiobuttons, but I do not want to use radiobutton list and I am not able to use Text property since I mark the Text for radiobutton in another row. All the radiobuttons' text are set as empty string. How can I get and set the value for the radiobuttons. Thanks.  <div>             <div> &nbsp;</div>            <div>                <span>1</span>&nbsp;&nbsp;                <span>2</span>&nbsp;&nbsp;                <span>3</span>&nbsp;&nbsp;            </div>            <div>                <span>4</span>&nbsp;&nbsp;                <span>5</span>&nbsp;&nbsp;            &n

Textbox Text Property

I am new to VB and I have read that if I don't explicity cast variable types it will eat up performance. I have been casting certain objects, such as values from data readers, but I was wondering if the object has a property that says it is a string, like the textbox "Text" property, if I need to still cast that as a string.   Right now my code says "txtSearch.Text" but should I be using "txtSearch.Text.ToString()"?   Thanks in advance for the help!
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