Monday, March 26, 2012

modal popup problem. blank textboxes

hi, im having problems here. i have a modal popup that when user clicks the edit button, the modal popup will appear and it contains the textboxes for editing.what's od is that the textboxes are all blank and i when i checked my codes not using modal popup, it is doing fine. i have these codes below:

1<asp:Button ID="btnEditPer" runat="server" Text="OK" />2 <asp:Button ID="btnCancel" runat="server" Text="Cancel" />3 </asp:Panel>45 <cc1:ModalPopupExtender ID="mpEditPer" runat="server"6 TargetControlID="lbEditPer"7 PopupControlID="Panel1"8 BackgroundCssClass="modalBackground"9 DropShadow="true"10 CancelControlID="btnCancel" >11 </cc1:ModalPopupExtender>

and then in the code behind:

1if (!IsPostBack)2 {3string id = Request.QueryString["EmployeeID"];4 Employee emp = Employee.ShowEmployeeByID(id);56this.lblFirstName.Text = emp.FirstName;7this.lblMiddleName.Text = emp.MiddleName;8this.lblLastName.Text = emp.LastName;9this.lblBirthdate.Text = emp.BirthDate.ToString();10this.lblBirthplace.Text = emp.BirthPlace;11this.lblNationality.Text = emp.Nationality;12this.lblReligion.Text = emp.ReligionID;13this.lblGender.Text = emp.Gender;14this.lblCivilStatus.Text = emp.CivilStatus;15this.lblHeight.Text = emp.Height;16this.lblWeight.Text = emp.Weight;17this.lblHairColor.Text = emp.HairColor;18this.lblEyeColor.Text = emp.EyeColor;1920//load data in textboxes and lists21this.txtFirstName.Text = emp.FirstName;22//other codes goes here23 }
i just wanted to test if i can get the value of the first name, but no luck. hope u can help me on this one. thanks in advance.

Is this code in the server click handler of the modalpopup targetcontrol button? The click event on that is cancelled and the modal popup only shows the popup on the client side. Could you possibly provide some more details on the setup?

No comments:

Post a Comment