Saturday, March 24, 2012

atlas textBox in to a update panel

hi i have this update panel, but it isn′t workig, adn i don′t know why, me by is becouse the attributes, tha i put on the textbox,

please i need help

Thanks

<%

@dotnet.itags.org.PageLanguage="C#"AutoEventWireup="true"CodeFile="Borrar1.aspx.cs"Inherits="Borrar_Borrar1" %>

<!

DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

htmlxmlns="http://www.w3.org/1999/xhtml">

<

headrunat="server"><title>Untitled Page</title>

</

head>

<

scriptlanguage="javascript"type="text/javascript">

<!--<![CDATA[

function intOnly(i)

{

if(i.value.length > 0)

{

i.value = i.value.replace(/[^\d]+/g,

'');

}

}

]]>-->

</

script>

<

body><formid="form1"runat="server"><atlas:ScriptManagerID="ScriptManager1"runat="server"></atlas:ScriptManager><div><atlas:UpdatePanelID="CountryCode"runat="server"RenderMode="Inline"><ContentTemplate><asp:TextBoxID="NumericCountryCode"runat="server"AutoPostBack="True"Columns="3"CssClass="textbox"MaxLength="3"OnTextChanged="NumericCountryCode_TextChanged"></asp:TextBox><spanid="CountryName"class="textbox"></span><asp:LabelID="lbCountryName"runat="server"CssClass="labelCountryFound"></asp:Label></ContentTemplate><Triggers><atlas:ControlEventTriggerControlID="ddBusiness"EventName="SelectedIndexChanged"/></Triggers></atlas:UpdatePanel></div><asp:DropDownListID="DropDownList1"runat="server"></asp:DropDownList></form>

</

body>

</

html>

using

System;

using

System.Data;

using

System.Configuration;

using

System.Collections;

using

System.Web;

using

System.Web.Security;

using

System.Web.UI;

using

System.Web.UI.WebControls;

using

System.Web.UI.WebControls.WebParts;

using

System.Web.UI.HtmlControls;

public

partialclassBorrar_Borrar1 : System.Web.UI.Page

{

protectedvoid Page_Load(object sender,EventArgs e)

{

*NumericCountryCode.Attributes.Add(

"onChange","intOnly(this);");

NumericCountryCode.Attributes.Add(

"onkeypress","intOnly(this);");

NumericCountryCode.Attributes.Add(

"onkeyup","intOnly(this);");

}

protectedvoid NumericCountryCode_TextChanged(object sender,EventArgs e)

{

lbCountryName.Text =

"Funciono atlas";

}

}

Hi,

By seeing your code, I could understand the atlas Script Manager tag missing an attribute "EnablePartialRendering".Include this attribute and set the value to true and try running. May be it work.

Regards,


I all ready tried EnablePartialRendering ="true", but it dosn′t work eather.


Please, i realy need help fixing this bug,

Thanks


hello.

not sure on what you want...if you want to cause a partial postback when the value of the textbox changem then you have to set the enablepartialrendering to true (scriptmanager) and set the autopostback to true (in the textbox).


Hello, what i am trying, is when de dropdown list change, cause a partial postback, seting the label = "lbCountryName".

i thik its because the atributes, i am, seting on the page load event on the control,
but if it true, then i can not set javascript atributes, to the controls when they are in the update panel?


hello again.

well, then set the autopostback to true on the dropdown (and, of course, set the enablepartialrendering to true too).

No comments:

Post a Comment