/    Sign up×
Community /Pin to ProfileBookmark

Javascript UpdatePanel Command doing my nut in!

I have two update panels on my asp.net page, one contains a textbox, i want the updatepanel2 to update when the text in the textbox is changed. So far ive tryed several different ways at the moment my textbox is set up like :

<asp:TextBox ID=”SearchText” onkeypress=”performPostBack(‘UpdatePanel2’)” AutoPostBack=”true” Width=”150px” runat=”server” OnTextChanged=”SearchText_TextChanged” />

<script type=”text/javascript”>
function performPostBack(aTargetElement, aArg)
{
var postBack = new Sys.WebForms.PostBackAction();
postBack.set_target(aTargetElement);
postBack.set_eventArgument(aArg);
postBack.performAction();
}
</script>

But this doesnt do what is “says” it should b doing, I found this here :

[url]http://forums.asp.net/t/1025752.aspx[/url]

and looked promising but I want it to perform the postback on textchange. any ideas will be greatly receieved as ive been doing this for days and Its really starting to make me pull my hair out! Si!

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @blink18jew spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...