<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void LinkButton1_Click(object sender, EventArgs e)
{
int imageWidth = Convert.ToInt32(TextBox2.Text);
Image1.Width = 1 * imageWidth;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Ajax SliderExtender - How to use SliderExtender in asp.net ajax</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkSeaGreen; font-style:italic;">Ajax Control Toolkit Example: Using SliderExtender</h2>
<hr width="450" align="left" color="DarkSeaGreen" />
<asp:ScriptManager
ID="ScriptManager1"
runat="server"
>
</asp:ScriptManager>
<cc1:SliderExtender
ID="SliderExtender1"
runat="server"
TargetControlID="TextBox1"
BoundControlID="TextBox2"
Minimum="200"
Maximum="600"
>
</cc1:SliderExtender>
<br />
<table>
<tr>
<td>
<asp:TextBox
ID="TextBox1"
runat="server"
>
</asp:TextBox>
</td>
<td>
<asp:TextBox
ID="TextBox2"
runat="server"
ForeColor="Crimson"
Width="25"
>
</asp:TextBox>
</td>
<td>
<asp:LinkButton
ID="LinkButton1"
runat="server"
Text="Change Image Size"
ForeColor="DodgerBlue"
Font-Bold="true"
BorderColor="CornflowerBlue"
BorderWidth="1"
OnClick="LinkButton1_Click"
>
</asp:LinkButton>
</td>
</tr>
</table>
<br />
<asp:Image
ID="Image1"
runat="server"
ImageUrl="~/Images/Tiger.jpg"
Width="200"
/>
</div>
</form>
</body>
</html>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void LinkButton1_Click(object sender, EventArgs e)
{
int imageWidth = Convert.ToInt32(TextBox2.Text);
Image1.Width = 1 * imageWidth;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Ajax SliderExtender - How to use SliderExtender in asp.net ajax</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:DarkSeaGreen; font-style:italic;">Ajax Control Toolkit Example: Using SliderExtender</h2>
<hr width="450" align="left" color="DarkSeaGreen" />
<asp:ScriptManager
ID="ScriptManager1"
runat="server"
>
</asp:ScriptManager>
<cc1:SliderExtender
ID="SliderExtender1"
runat="server"
TargetControlID="TextBox1"
BoundControlID="TextBox2"
Minimum="200"
Maximum="600"
>
</cc1:SliderExtender>
<br />
<table>
<tr>
<td>
<asp:TextBox
ID="TextBox1"
runat="server"
>
</asp:TextBox>
</td>
<td>
<asp:TextBox
ID="TextBox2"
runat="server"
ForeColor="Crimson"
Width="25"
>
</asp:TextBox>
</td>
<td>
<asp:LinkButton
ID="LinkButton1"
runat="server"
Text="Change Image Size"
ForeColor="DodgerBlue"
Font-Bold="true"
BorderColor="CornflowerBlue"
BorderWidth="1"
OnClick="LinkButton1_Click"
>
</asp:LinkButton>
</td>
</tr>
</table>
<br />
<asp:Image
ID="Image1"
runat="server"
ImageUrl="~/Images/Tiger.jpg"
Width="200"
/>
</div>
</form>
</body>
</html>
No comments:
Post a Comment