W
wiertara
Hi, i have a problem with refreshing data in UpdatePanel. In aspx file
i have a AjaxToolKit TabContainer and inside it a UpdatePanel:
<asp:UpdatePanel ID="upRemoveUser" runat="server"
OnLoad="upRemoveUser_Load">
<ContentTemplate>
<center>
<asp
anel ID="pnlInfoRemove"
runat="server" Height="20px" Width="400px" Visible="false">
<asp:Image ID="imgInfoRemove"
runat="server" Height="14px" />
<asp:Label ID="lblInfoRemove"
runat="server" ForeColor="Blue" Text="Label"></asp:Label>
</asp
anel>
<table class="NewUser">
<tr class="Login">
<td colspan="2"
class="tableHeader" align="center">
Usuñ u¿ytkownika</td>
</tr>
<tr>
<td class="Login"
align="right">
Login u¿ytkownika:</
td>
<td align="left">
<asp
ropDownList
ID="ddlUsersToRemove" runat="server" Width="250px" AutoPostBack="True"
DataTextField="NameAndLogin" DataValueField="ID" CssClass="textBox">
</asp
ropDownList>
</td>
</tr>
<tr>
<td class="Login"
align="right">
Nazwa u¿ytkownika:</
td>
<td align="left">
<asp:TextBox
ID="txtRemoveName" runat="server" MaxLength="70" Width="80%"
ReadOnly="True"
CssClass="textBox"
Enabled="false"></asp:TextBox>
<asp:Label ID="Label1"
runat="server" ForeColor="Red" Width="5px"></asp:Label>
</td>
</tr>
<tr>
<td align="right">
Uprawnienia:</td>
<td align="left">
<asp
ropDownList
ID="ddlRemoveRights" Width="81%" runat="server" Enabled="False"
CssClass="textBox">
<asp:ListItem
Selected="True" Value="0">U¿ytkownik podstawowy</asp:ListItem>
<asp:ListItem
Value="1">U¿ytkownik zaawansowany</asp:ListItem>
</asp
ropDownList></
td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button
ID="btnRemoveUser" runat="server" Text="Usuñ"
OnClick="btnRemoveUser_Click" />
<cc1:ConfirmButtonExtender ID="cbeRemoveUser" runat="server"
TargetControlID="btnRemoveUser"
ConfirmText="Czy
na pewno chcesz usun±æ tego u¿ytkownika?">
</
cc1:ConfirmButtonExtender>
</td>
</tr>
</table>
</center>
</ContentTemplate>
</asp:UpdatePanel>
In upRemoveUser_Load event i get data from database and fill TextBox
and DropDownList:
protected void upRemoveUser_Load(object sender, EventArgs e)
{
selectedUserRemove = GetUserDetails(ddlUsersToRemove);
if (selectedUserRemove != null)
{
txtRemoveName.Text = selectedUserRemove.Name;
ddlRemoveRights.SelectedIndex =
Convert.ToInt32(selectedUserRemove.Advanced);
}
}
After page loading and after first DropDownList value change
everything is ok but after every next change nothing happens
While
dubugging TextBox text and DropDownList selectedIndex are changing but
no change is visible on interface.
Please help me
i have a AjaxToolKit TabContainer and inside it a UpdatePanel:
<asp:UpdatePanel ID="upRemoveUser" runat="server"
OnLoad="upRemoveUser_Load">
<ContentTemplate>
<center>
<asp
runat="server" Height="20px" Width="400px" Visible="false">
<asp:Image ID="imgInfoRemove"
runat="server" Height="14px" />
<asp:Label ID="lblInfoRemove"
runat="server" ForeColor="Blue" Text="Label"></asp:Label>
</asp
<table class="NewUser">
<tr class="Login">
<td colspan="2"
class="tableHeader" align="center">
Usuñ u¿ytkownika</td>
</tr>
<tr>
<td class="Login"
align="right">
Login u¿ytkownika:</
td>
<td align="left">
<asp
ID="ddlUsersToRemove" runat="server" Width="250px" AutoPostBack="True"
DataTextField="NameAndLogin" DataValueField="ID" CssClass="textBox">
</asp
</td>
</tr>
<tr>
<td class="Login"
align="right">
Nazwa u¿ytkownika:</
td>
<td align="left">
<asp:TextBox
ID="txtRemoveName" runat="server" MaxLength="70" Width="80%"
ReadOnly="True"
CssClass="textBox"
Enabled="false"></asp:TextBox>
<asp:Label ID="Label1"
runat="server" ForeColor="Red" Width="5px"></asp:Label>
</td>
</tr>
<tr>
<td align="right">
Uprawnienia:</td>
<td align="left">
<asp
ID="ddlRemoveRights" Width="81%" runat="server" Enabled="False"
CssClass="textBox">
<asp:ListItem
Selected="True" Value="0">U¿ytkownik podstawowy</asp:ListItem>
<asp:ListItem
Value="1">U¿ytkownik zaawansowany</asp:ListItem>
</asp
td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button
ID="btnRemoveUser" runat="server" Text="Usuñ"
OnClick="btnRemoveUser_Click" />
<cc1:ConfirmButtonExtender ID="cbeRemoveUser" runat="server"
TargetControlID="btnRemoveUser"
ConfirmText="Czy
na pewno chcesz usun±æ tego u¿ytkownika?">
</
cc1:ConfirmButtonExtender>
</td>
</tr>
</table>
</center>
</ContentTemplate>
</asp:UpdatePanel>
In upRemoveUser_Load event i get data from database and fill TextBox
and DropDownList:
protected void upRemoveUser_Load(object sender, EventArgs e)
{
selectedUserRemove = GetUserDetails(ddlUsersToRemove);
if (selectedUserRemove != null)
{
txtRemoveName.Text = selectedUserRemove.Name;
ddlRemoveRights.SelectedIndex =
Convert.ToInt32(selectedUserRemove.Advanced);
}
}
After page loading and after first DropDownList value change
everything is ok but after every next change nothing happens
dubugging TextBox text and DropDownList selectedIndex are changing but
no change is visible on interface.
Please help me