Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

AJAX 101 -- event not firing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Mott - 14 Sep 2007 18:49 GMT
This is a total ID-10T error, but since its my first attempt I'm missing the
obvious.

I downloaded the framework, create an AJAX enabled app, added a page, and
added an update panel with this:

<asp:UpdatePanel ID="updateCategory" runat="server">
   <ContentTemplate>
       <asp:CheckBox runat="server" ID="chkCategory"
OnCheckedChanged="chkCategory_OnCheck" />
   </ContentTemplate>
</asp:UpdatePanel>

However, the event isn't firing on click, the events are queued until the
next page refresh. Is there a 'hey dummy' checklist? No errors, just no
events.

thanks,

john
bruce barker - 14 Sep 2007 20:02 GMT
if you want the checkbox to post to the server when chcecked, set
AutoPostBack = true

-- bruce (sqlwork.com)

> This is a total ID-10T error, but since its my first attempt I'm missing the
> obvious.
[quoted text clipped - 16 lines]
>
> john
John Mott - 14 Sep 2007 20:26 GMT
Thank you, that was it. I guess I assumed that putting it in a panel implied
a server hit, but it makes more sense to have the controls do what they
normally do.

John

> "bruce barker" wrote:
> if you want the checkbox to post to the server when chcecked, set
> AutoPostBack = true

> -- bruce (sqlwork.com)
>
[quoted text clipped - 18 lines]
>>
>> john
John Mott - 14 Sep 2007 21:07 GMT
Thank you again. The next thing i found was that I can't figure out how to
pass a value back in through a checkbox. It never occurred to me before that
the <asp:checkbox> didn't have a "value" attribute, so how do you use a
checkbox to send a value (like a key value to set or clear in a collection)
back into the server?

absent this ability i'll have to implement a button and some sort of
mark/not marked state, which the checkbox is perfect for.

thanks again

john

> if you want the checkbox to post to the server when chcecked, set
> AutoPostBack = true
[quoted text clipped - 21 lines]
>>
>> john

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.