Folks,
I have a modalpopupextended panel with several textboxes. Everytime I cause postback the textboxes within the panel have a comma appended to their text. I cannot work out what is causing this.
E.g.
Initially controls are set to database values
textbox1.text="John"
When I postback based on say a dropdownlist autopostback, all textbox controls within the MPE have a comma appended to their text
textbox1.text="John,"
then
textbox1.text="John,," etc.
Has anyone seen this before with the mpe?
Thanks
K
<
asp:ContentID="Content1"ContentPlaceHolderID="maincontent"runat="Server"><divid="adminedit"><fieldset><!-- add H2 here and hide it with css since you can not put h2 inside a legend tag --><h2class="none">User List</h2><legend>User List</legend><asp:ObjectDataSourceID="UserData"runat="server"TypeName="BusinessLogicLayer.Person"SelectMethod="GetPersonnel"SortParameterName="sortParameter"></asp:ObjectDataSource>
<asp:ObjectDataSourceID="DepartmentData"runat="server"TypeName="BusinessLogicLayer.Department"SelectMethod="GetAllDepartments">
</asp:ObjectDataSource>
<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager>
<asp:UpdatePanelID="updPerson"runat="server"ChildrenAsTriggers="false"UpdateMode="Conditional"><Triggers><asp:AsyncPostBackTriggerControlID="ListAllUsers"EventName="Sorting"/>
</Triggers>
<ContentTemplate><!-- Hidden button for modalpopup target control --><asp:ButtonID="btnHiddenPerson"runat="Server"Style="display:none"/>
<cc1:ModalPopupExtenderID="mpePersonDetails"runat="server"TargetControlID="btnHiddenPerson"PopupControlID="pnlUserDetails"BackgroundCssClass="modalBackground"CancelControlID="btnCancel">
</cc1:ModalPopupExtender>
<asp:GridViewID="ListAllUsers"DataSourceID="UserData"AutoGenerateColumns="False"DataKeyNames="PersonId"AllowSorting="True"AllowPaging="True"runat="server"BorderWidth="0px"BorderStyle="None"Width="90%"CellPadding="2"PageSize="20"GridLines="None"><Columns><asp:BoundFieldDataField="PersonId"HeaderText="Identification"ReadOnly="True"Visible="False"/><asp:BoundFieldDataField="UserName"HeaderText="User Name"ReadOnly="True"SortExpression="UserName"/><asp:BoundFieldDataField="Email"HeaderText="Email"ReadOnly="True"/><asp:BoundFieldDataField="Name"HeaderText="First Name"ReadOnly="True"SortExpression="Name"/><asp:BoundFieldDataField="Surname"HeaderText="Surname"ReadOnly="True"SortExpression="SurName"/><asp:BoundFieldDataField="CodeName"HeaderText="Code Name"ReadOnly="True"SortExpression="CodeName"/><asp:BoundFieldDataField="IndicativeDailyRate"HeaderText="Daily Rate"ReadOnly="True"SortExpression="IndicativeDailyRate"/><asp:BoundFieldDataField="DepartmentId"HeaderText="Department Id"ReadOnly="True"Visible="False"SortExpression="DepartmentId"/>
<asp:TemplateFieldShowHeader="False"><ItemTemplate><asp:LinkButtonID="lnk_edit"runat="server"OnClick="lnkEdit_Click">...Edit</asp:LinkButton></ItemTemplate></asp:TemplateField></Columns><RowStyleCssClass="row1"/><HeaderStyleCssClass="grid-header"HorizontalAlign="Left"/><EmptyDataTemplate><asp:LabelID="Label10"runat="server"Text="Label">There are no users</asp:Label></EmptyDataTemplate></asp:GridView><asp:ButtonID="CreateUser"runat="server"Text="Create new user"CssClass="submit"OnClick="CreateUser_Click"/>
</div>
<!-- PopUpPanel begin -->
<asp:PanelID="pnlUserDetails"runat="server"CssClass="modalBox"Style="display:none;"width="500px"><
fieldset><
labelid="lblUserDetails">User Details
</label><
tablewidth="100%"><tr><tdnowrap="nowrap"width="120"><asp:LabelID="lblPersonID"Visible="false"runat="server"Text="-1"></asp:Label><label>User Name</label></td><td><asp:LabelID="lblUserName"runat="server"Text=""></asp:Label></td></tr><tr><tdnowrap="nowrap"width="120"><label>First Name</label></td><td><asp:TextBoxID="tbFirstName"runat="server"Width="250px"></asp:TextBox><labelid="lblFirstNamerqd"style="color:Red;display:none">Firstname required!</label></td></tr><tr><tdnowrap="nowrap"width="120"><label>Surname</label></td><td><asp:TextBoxID="tbSurname"runat="server"Width="250px"></asp:TextBox><labelid="lblSurnamerqd"style="color:Red;display:none">Surname required!</label></td></tr><tr><tdnowrap="nowrap"width="120"><label>Code Name</label></td><td><asp:TextBoxID="tbCodeName"runat="server"Width="250px"></asp:TextBox><labelid="lblCodenamerqd"style="color:Red;display:none">Code required!</label></td></tr><tr><tdnowrap="nowrap"width="120"><label>Email</label></td><td><asp:TextBoxID="tbEmail"runat="server"Width="250px"></asp:TextBox><labelid="lblEmail"style="color:Red;display:none">Email required!</label></td></tr><tdnowrap="nowrap"width="120"><label>Indicitive Daily Rate</label></td><td><asp:TextBoxID="tbRate"runat="server"Width="250px"></asp:TextBox><labelid="lblDRreqd"style="color:Red;display:none">Numerics only!</label></td></tr>
<tr><tdnowrap="nowrap"width="120"><label>Department</label></td><td><asp:DropDownListID="ddlDepartment"Width="250px"runat="server"DataSourceID="DepartmentData"DataTextField="DepartmentName"OnSelectedIndexChanged="ddlDepartment_SelectedIndexchanged"DataValueField="DepartmentId"AutoPostBack="true"><asp:ListItemValue="-1"Text="...Select"></asp:ListItem></asp:DropDownList>
<labelid="lblDepartmentreqd"style="color:Red;display:none">Select a Department!</label></td></tr>
<tr><tdnowrap="nowrap"width="120"><label>Role</label></td><td><asp:DropDownListID="ddlRole"Width="250px"runat="server"AppendDataBoundItems="true"><asp:ListItemValue="-1"Text="...Select"></asp:ListItem>
</asp:DropDownList>
<labelid="lblRole"style="color:Red;display:none">Select a Role!</label></td></tr>
<tr><tdcolspan="2"><divstyle="white-space:nowrap; text-align:center;"><asp:ButtonID="btnSave"runat="server"Text="Save"OnClick="btnSave_Click"CausesValidation="true"/><asp:ButtonID="btnCancel"runat="server"CausesValidation="false"Text="Cancel"/>
</div></td></tr>
</
table></
fieldset></asp:Panel><!--Popup Panel end-->
</ContentTemplate></
asp:UpdatePanel></fieldset></
div>
</
asp:Content>