Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with AJaX NumericUpDownExtender

Status
Not open for further replies.

saminetemad

Programmer
Dec 13, 2010
9
IR
Hello,
I have a AJAX NumericUpDownExtender and Text box dependent on this . I want when I clicked on the button text of Textbox dependent on the NumericUpDownExtender transfer to another textbox .
Iwrite this code:
</cc1:NumericUpDownExtender>
<cc1:NumericUpDownExtender ID="NumericUpDownExtender2" runat="server" Enabled="True"
Maximum="1.7976931348623157E+308" Minimum="-1.7976931348623157E+308" RefValues=""
ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="desc2"
TargetButtonUpID="asc2" TargetControlID="TextBox2" Width="0">
</cc1:NumericUpDownExtender>
<asp:TextBox ID="TextBox2" runat="server" ReadOnly="True" Text="1389" Width="40px"></asp:TextBox>
<asp:ImageButton ID="asc2" runat="server" Height="20px" ImageUrl="~/images/asc.gif"
Width="10px" />
<asp:ImageButton ID="desc2" runat="server" Height="20px" ImageUrl="~/images/desc.gif"
Width="10px" />


and in the C# page:
protected void Button1_Click(object sender, EventArgs e)
{
TextBox5.Text = TextBox2.Text;
}

but this code doesn't work correctly.when TextBox2.Text chenged by NumericUpDownExtender 2 , in the TextBox5 display 1389.why?
Thanks for any help.

 
You may have a much easier time with client scripting if you use jQuery (and it's plug-ins). Not to mention that posting to the server just to transfer a number from one input to another is highly inefficient. The only thing to watch out for with jQuery and webforms is the auto-generated client ids. there are ways to work around that though.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Hi,
If delete attribute "read only" in text box ,Code will work correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top