CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 11/18/2004 7:22:17 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 62 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
chintu007
Asp.Net User
raising post back for a custom server control11/18/2004 7:22:17 PM

0/0

Hello,

I am writing custom server control that is part of a page that has many of other server controls.
Now, my server control has a combo box in it and a list box. As i change my selection in combobox, the items in listbox should change. So i wired up the selectedIndexChanges event.

I added the following line of code in CreateChildControls() method:

this.m_cbxSecurity.SelectedIndexChanged +=new EventHandler(m_cbxSecurity_SelectedIndexChanged);

and then i defined the method m_cbxSecurity_SelectedIndexChanged in the same class.

After doing all this, the control is not firing the event. Iam unable to guess wahts going on.
I'll appriciate some help.

Thanks
bmains
Asp.Net User
Re: raising post back for a custom server control11/18/2004 7:58:09 PM

0/0

Is AutoPostBack set to true for the control?
Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
chintu007
Asp.Net User
Re: raising post back for a custom server control11/18/2004 9:15:24 PM

0/0

yes
bmains
Asp.Net User
Re: raising post back for a custom server control11/22/2004 1:15:13 PM

0/0

Hey,

Did you try debugging the control? Are you sure it's not firing? Maybe it's the code within the event handler that has issues... try putting a breakpoint on that event handler to double-check.

Brian
Brian

"Trust in the Lord and do what is good; dwell in the land and live securely. Take delight in the Lord, and He will give you your heart's desires" (Psalm 37: 3-4).
gogowater
Asp.Net User
Re: raising post back for a custom server control11/22/2004 5:38:40 PM

0/0

There are two ways to approach this problem. The easy way is to create a event delegate for that combo box in the custom control, and then use the event delegate in the aspx page to response the event. The standard hard way is to implement IPostBackDataHandler to your custom server control (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuiipostbackdatahandlerclasstopic.asp). This way you will be able to catch the postback from the request object and trigger your event handler. Hope this helps.
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Microsoft ASP.NET Programming with Microsoft Visual C# .NET Step by Step: Version 2003 Authors: G. Andrew Duthie, Pages: 624, Published: 2003
Microsoft ASP.NET Programming with Microsoft Visual Basic .NET Step by Step: Version 2003 Authors: G. Andrew Duthie, Pages: 624, Published: 2003
Developing Microsoft ASP.NET Server Controls and Components Authors: Nikhil Kothari, Vandana Datye, Pages: 689, Published: 2002
Professional ASP.NET 1.1 Authors: Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson, Pages: 1337, Published: 2004
ASP.NET AJAX Programmer's Reference: With ASP.NET 2.0 Or ASP.NET 3.5 Authors: Shahram Khosravi, Pages: 1522, Published: 2007
Inside ASP.NET Authors: Scott Worley, Pages: 704, Published: 2001

Web:
CodeProject: ASP.NET Server Control - Updown Control 1. Free ... Net custom server control; Author: Softomatix; Section: User Controls; Chapter: Web ... The Up-down control has no way of raising post back events. ...
ASP.Net UpDown Server Control To render HTML tags for your custom server control it is very essential that you provide ... The Up-down control has no way of raising post back events. ...
Custom DropDownList with client-to-server postback - ASP.NET Forums If you want to raise an additional server-side postback event, then you should ... One more thing, I am new to developping server control, ...
Building a Custom Registration and Login Control NET developers is the inclusion of a set of server controls that encapsulate .... In the RegLogin control, we need to handle three postback possibilities: ...
how to fire custom server control events before Page_Load event I would like to fire some custom server control event before Page_Load event ... (as soon as postback data is availiable). ...
Postback input handling by server-side control objects - Patent ... Handling of such postback input is typically performed in custom ..... to postback input, server-side control objects can raise server-side events to ...
Justin Lovell's Blog : Server Controls in Custom Collections ... The post back ID is mapping to the server control that will raise a post ... to the control developer to cycle through the custom property that exposes the ...
Safari Books Online - 0735615829 - Developing Microsoft ASP.NET ... Mapping a Postback Event to a Server Event— The IPostBackEventHandler Interface .... control is invoked by the page during the Raise Postback Event phase. ...
O'Reilly - Safari Books Online - 0735615322 - Building .NET ... If a custom control wants to generate a postback and raise events as a result, ... 1 render as links, which cause postback to the server when selected. ...
Postback input handling by server-side control objects - Patent ... For example, in response to postback input, server-side control objects can raise server-side events to server-side code registered for those events. ...




Search This Site:










connection string as a control - urgent

losing input from controls on postback

adding tag to the control's father page

useer control within user control

**please help: simple custom web server control renders with error during design-time support!

how can i reget the previos data from control...please teach...me..

add image into custom control dll or what is the best way ...

please help... how to make a copy of my webiste database from my web host?

style to string

license clause clarification: commercial software hosting service.

return selected value from dynamic dropdrownlist custom control

spell checker -- should i build or buy? -- anyone suggest a 3rd party that you like?

how to refresh design view in custom controls

write script tag in <head> in custom control

derived classes cannot raise base class events

ie screen designer and xsl rendering in .net custom control

godaddy hosting and asp.net 2.0 + atlas

set background to dynamically created htmltable

internet explorer controls

making the guestbook work online

am i registering the controls wrong???

need help finding hosting!!

dropdownlist requery

dynamic controls on post back?

should be simple custom control

designing time of custom server control

question on hosting with full trust

would like my datalist onitemcommand to trap my custom control action.

how to overcome the need to pay for sql2005 in asp.net 2.0 hosting

no expandable property for system.web.ui.webcontrols.treenode in .net framework 2.0?

  Privacy | Contact Us
All Times Are GMT