I have a web user control that I'm including in a page. I have one htmlselect control that's runat=server so it can get populated from the database. Now, this page is not in a runat=server form and does not post, viewstate is disabled. Instead, it's a simple GET form and the field goes up into the query string where the page can be easily bookmarked.
My problem is, since the htmlselect is running at the server in a user control, ASP.NET futzes with the id's, adding a _ctl3_ prefix. I realize it does this to prevent name conflicts, such as including two copies of the user control on a given page. I append the query string to this page from other places as well that will not know the control's clientid, so that is not an option. Changing the control's ID just changes what's after the prefix.
Is there something I can set so the clientid is something I specify? I want "Filter" not "_ctl3_Filter". Perhaps I'm just used to other languages that always give the developer enough rope to hang himself. Any way to disable this prefix safety feature on a specific page/control/user control?
My other option is to generate the control with a repeater, but this is a less clean design, albeit fully functional.
Thanks.
________________________________________
Andrew
I work for a gift card company!
My problem is, since the htmlselect is running at the server in a user control, ASP.NET futzes with the id's, adding a _ctl3_ prefix. I realize it does this to prevent name conflicts, such as including two copies of the user control on a given page. I append the query string to this page from other places as well that will not know the control's clientid, so that is not an option. Changing the control's ID just changes what's after the prefix.
Is there something I can set so the clientid is something I specify? I want "Filter" not "_ctl3_Filter". Perhaps I'm just used to other languages that always give the developer enough rope to hang himself. Any way to disable this prefix safety feature on a specific page/control/user control?
My other option is to generate the control with a repeater, but this is a less clean design, albeit fully functional.
Thanks.
________________________________________
Andrew
I work for a gift card company!