Hello,
I have a button on my page, TexBox that will contain the name of a person and empty rotator at the beginning, how can we add items (image) in my rotator by clicking on the button, I have been the following code in the button's onclick:
C# :
protected void btn_Click (object sender, EventArgs e)
{
System.Web.UI.WebControls.Image Image image = new ();
image.ImageUrl = "~ / Images / Customers /" + + TextBoxmember.Text. "jpg"};
RadRotatorItem item = new RadRotatorItem ();
item.Controls.Add (image);
RadRotator1.Items.Add (item);
}
aspx:
<asp:TextBox ID="TextBoxmember" Width="245px" CssClass="inputTextEntryAutocomp" TabIndex="2" runat="server"></asp:TextBox>
<telerik:RadButton ID="btnIcon" runat="server" Height="30px" Width="150px" Skin="Windows7"
Text="Add member"
onclick="btn_Click">
<Icon PrimaryIconUrl ="~/Images/FIT_Ajout_BOITE_ON_Small.png" PrimaryIconLeft="2px" PrimaryIconTop="2px" PrimaryIconHeight="25px" PrimaryIconWidth="35px"/>
</telerik:RadButton>
<telerik:RadRotator ID="RadRotator1" runat="server"
CssClass="verticalRotator" Height="250px" ScrollDuration="500" FrameDuration="2000"
ItemHeight="110"
RotatorType = "Buttons">
<ItemTemplate >
</ItemTemplate>
</telerik:RadRotator>
the problem is that it always loads the last person on entry and not save the old values.
thank you
I have a button on my page, TexBox that will contain the name of a person and empty rotator at the beginning, how can we add items (image) in my rotator by clicking on the button, I have been the following code in the button's onclick:
C# :
protected void btn_Click (object sender, EventArgs e)
{
System.Web.UI.WebControls.Image Image image = new ();
image.ImageUrl = "~ / Images / Customers /" + + TextBoxmember.Text. "jpg"};
RadRotatorItem item = new RadRotatorItem ();
item.Controls.Add (image);
RadRotator1.Items.Add (item);
}
aspx:
<asp:TextBox ID="TextBoxmember" Width="245px" CssClass="inputTextEntryAutocomp" TabIndex="2" runat="server"></asp:TextBox>
<telerik:RadButton ID="btnIcon" runat="server" Height="30px" Width="150px" Skin="Windows7"
Text="Add member"
onclick="btn_Click">
<Icon PrimaryIconUrl ="~/Images/FIT_Ajout_BOITE_ON_Small.png" PrimaryIconLeft="2px" PrimaryIconTop="2px" PrimaryIconHeight="25px" PrimaryIconWidth="35px"/>
</telerik:RadButton>
<telerik:RadRotator ID="RadRotator1" runat="server"
CssClass="verticalRotator" Height="250px" ScrollDuration="500" FrameDuration="2000"
ItemHeight="110"
RotatorType = "Buttons">
<ItemTemplate >
</ItemTemplate>
</telerik:RadRotator>
the problem is that it always loads the last person on entry and not save the old values.
thank you