Usercontrol in Asp.net with C#
-
Hi I created one user control for list of years to populate in dropdownlist.. i want to use same usercontrol in pageload for two dropdown list controls(i mean i want to populate listofyears in two dropdownlists).. I can't make same ID for two dropdownlist na..How can i call my usercontrol to two dropdowncontrols in same page??? can anyoneexplain in detail...Thanx in advance
-
Hi I created one user control for list of years to populate in dropdownlist.. i want to use same usercontrol in pageload for two dropdown list controls(i mean i want to populate listofyears in two dropdownlists).. I can't make same ID for two dropdownlist na..How can i call my usercontrol to two dropdowncontrols in same page??? can anyoneexplain in detail...Thanx in advance
First if all the UserControl contains in a dropdownlist then it is overkill, just create two dropdowns on your page and populate them from the same datasource.
only two letters away from being an asset
-
First if all the UserControl contains in a dropdownlist then it is overkill, just create two dropdowns on your page and populate them from the same datasource.
only two letters away from being an asset
Well, if you use the same datasource, they will sync up, you need to clone the datasource for the second contrll, don't you ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
Well, if you use the same datasource, they will sync up, you need to clone the datasource for the second contrll, don't you ?
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
Perhaps I'm missing something, or misinterpreting, the original and your post. List years = .... DropDown1.DataSource = years DropDown2.DataSource = years
only two letters away from being an asset
-
Perhaps I'm missing something, or misinterpreting, the original and your post. List years = .... DropDown1.DataSource = years DropDown2.DataSource = years
only two letters away from being an asset
Maybe it's only in winforms that that won't work. Actually, I think it is only winforms.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp