Groups | Blog | Home
all groups > asp.net building controls > august 2003 >

asp.net building controls : how to fire a postback event


kevinchu1021 NO[at]SPAM yahoo.com
8/8/2003 12:28:06 PM
Hi, All

I design a composite custom control, which has three dropdownlists in
it. I find as long as one of the dropdownlist control's id is assigned
using uniqueid property of my custom control then a postback event
will be fired, but since my dropdownlist has javascript event which
does some function and using dropdownlist ids to identify them, since
uniqueid is generated dynamaically, it is difficult for my js function
know the id, is there any other method to solve the problem, i tried
create a hidden type input with id = uniqueid, but it seems postback
event can't be fired... needs help thx a lot

regards
Matt Dockerty
8/12/2003 10:41:37 AM
Not much experience with custom controls but this should work. Call
Page.RegisterRequiresPostBack(control) to request that your parent control
is notified about the post data. You then need to implement
IPostBackDataHandler on the control to recieve the postback data.

hth, Matt

[quoted text, click to view]

AddThis Social Bookmark Button