473,813 Members | 4,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with Events in the placeholder control

rs
Hi,

I have a placeholder control, which I populate dynamically with one of
the web user controls depending upon some criteria. I have a data grid
and a drop in the the user control.

The way it should work is, when a value in the drop down control(in
the web user control loaded in the place holder control) is selected
the data grid should load information accordingly.

This is not happening. DB Grid always gets the value for the first
item in the drop down control. For some reson when the page reloads
the very first item is selected.

I have EnableViewState = true.

Any help is appreciated.

Thanks,
RS
Nov 18 '05 #1
1 1216
Hi,

See, logically what happening is, the Grid is only able to get the value
from the DropDown at Postbacks, so it is getting the first item everytime.

Tha catch is, try to fill the Grid in the DropDown's selectedindexch anged
event, And i think you're done.

Regards
Joyjit
"rs" <rs***@hotmail. com> wrote in message
news:b5******** *************** ***@posting.goo gle.com...
Hi,

I have a placeholder control, which I populate dynamically with one of
the web user controls depending upon some criteria. I have a data grid
and a drop in the the user control.

The way it should work is, when a value in the drop down control(in
the web user control loaded in the place holder control) is selected
the data grid should load information accordingly.

This is not happening. DB Grid always gets the value for the first
item in the drop down control. For some reson when the page reloads
the very first item is selected.

I have EnableViewState = true.

Any help is appreciated.

Thanks,
RS

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4482
by: Mark | last post by:
I have been working for quite some time on this issue which in theory should be quite simple. The problem is that the Cancel and Save events are not fired when their respective buttons are clicked. I have read several posts which say to put your column generating section in the Page_Init section and it will solve the problem....however, it hasn't solved mine. Can somebody please take a look at this and provide any insight if possible?
4
2562
by: blue | last post by:
I have a drop-down list, a radio button list and a submit button. I'm adding these controls to a table and I'm adding the table to a Placeholder. I'm adding it to the Placeholder because I don't know exactly where the table will be located on the page until runtime. Before the form control table is added to the Placeholder, I'm adding a whole bunch of tables to the Placeholder. This is a flowchart program and I have multiple action boxes...
1
8177
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the first time the control is dynamically loaded, everything works fine. After that, if the control is loaded again from the page button event handler, the user controls events fail to fire on the first click NOTE: I (believe I) am rebuilding all...
4
1592
by: JezB | last post by:
I am dynamically creating WebControls and creating them on my page. Some of these are buttons, and I attach events to these buttons. The problem is these force a post-back, so I must regenerate all the webcontrols in the same way (I am assuming - am I right?). It was all working fine but now I get the error: "An error has occurred because a control with auto-generated id '_ctl129' could not be located to raise a postback event. To...
0
1086
by: KK | last post by:
Hi I have a main page called lobby.aspx. lobby have the main menu. below that I loads web user controls (ascx) according to the selected main menu (into a placeholder). Some of my ascx, in turn loads other ascx.
4
1945
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
0
1938
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
7
3118
by: AndrewMBaldwin | last post by:
I have a grid control (inherits from Placeholder) that has a few buttons on it. On this grid there is a filter form, which allows the user to filter/search the table for specific information. My problem is, that the order in which the event gets called. What is basically happening is that the control is instantiated, I call my initialize method, then I wait for the user to call GenerateGrid, in case they wanted to make any last minute...
0
1556
by: seigo | last post by:
Hello, I faced with the following problem. I have a PlaceHolder on a page and a few UserControls which have custom events, for instance: public delegate void SelectHandler(object sender, SelectEventArgs e); public event SelectHandler OnSelect; protected void Page_Load(object sender, EventArgs e)
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9607
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10406
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10139
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5568
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3881
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3029
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.