ASP.NET Custom Controls and "Dynamic" Event Model -


ok, not sure if title accurate, open suggestions!

i in process of creating asp.net custom control, still relatively new me, please bear me.

i thinking event model. since not using web controls there no events being fired buttons, rather manually calling __dopostback appropriate arguments. can mean there lot of postbacks occuring when say, selecting options (which render differently when selected).

in time, need make more ajax-y , responsive, need change event binding call local javascript.

so, thinking should able toggle "mode" of control, can either use postback , handlle itself, or can specify javascript function names call instead of dopostback.

  • what thoughts on this?
  • am approaching raising of events control in wrong way? (totally open suggestions here!)
  • how approach similar problem?

edit - clarify

  • i creating custom rendered control (i.e. inherits webcontrol).
  • we not using existnig web controls since want complete control on rendered output.
  • afaik way server side event occur custom rendered control call dopostback rendered elements (please correct if wrong!).
  • asp.net mvc not option.

very odd. you're using asp.net server controls , custom controls, you're not using web controls? , you're calling __dopostback manually?

do things hard way?

if still using server control model rather mvc, slap asp.net ajax controls on sucker , call day. you're doing putting blower on model t. may fun , interesting, after you're done hard work, have?


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -