Ask a Question related to ASP.NET Building Controls, Design and Development.
-
sushil prasad #1
Dynamic controls button event in vb.net 2005
I have created a control with some label, textbox and Button. On the click
of the button the entries in textbox on the control is validated and a
database table is updated. The button click event works when the
control is placed directly on the panel from design window but not when i
use
programming to load the control.
I need to be able to load the control dynamically into panel as this depends
on some selection user does in main window.
Here's how i load the control into panel:
panel1.controls.add(page.loadcontrol("MyControl.as cx"))
Thanks for help
Sushil
sushil prasad Guest
-
Dynamic User Controls Event Handling
In my web form to the place holder i'm loading different User Controls depends on some conditions for the user control which is loaded first time... -
Dynamic User Controls Event Handling Problem
I've three user control 1,2 in the web form i had a place holder control to that place holder i'm loading either 1 or 2 depending on some... -
Event not firing.adding dynamic controls to Usercontrol.
I am adding controls to the UserControl dynamically and then loading the UserControl Dynamically.But I am facing problem with firing of click event... -
Dynamic Controls & Event Notifications
Here's a reply to another, related post: The subject of the post is "viewstate question", if you want to find the thread... HTH. -----... -
Dynamic Controls & Event Notifications -- Correction
"Jason Turim" <leisuretimeindustries@hotmail.com> wrote in message news:uVWAZX%23SDHA.3088@TK2MSFTNGP10.phx.gbl... rows. but textboxes -
Gaurav Vaish \(www.EdujiniOnline.com\) #2
Re: Dynamic controls button event in vb.net 2005
That's depends on where you are adding the control.
If you're adding it in CreateChildControls, it would work!
--
Happy Hacking,
Gaurav Vaish | [url]www.mastergaurav.com[/url]
[url]www.edujinionline.com[/url]
[url]http://eduzine.edujinionline.com[/url]
-----------------------------------------
"sushil prasad" <sushil@dccnet.com> wrote in message
news:12lngnr1pt2vk14@corp.supernews.com...>I have created a control with some label, textbox and Button. On the click
> of the button the entries in textbox on the control is validated and a
> database table is updated. The button click event works when the
> control is placed directly on the panel from design window but not when i
> use
> programming to load the control.
> I need to be able to load the control dynamically into panel as this
> depends
> on some selection user does in main window.
>
> Here's how i load the control into panel:
>
> panel1.controls.add(page.loadcontrol("MyControl.as cx"))
>
> Thanks for help
>
> Sushil
>
>
>
>
Gaurav Vaish \(www.EdujiniOnline.com\) Guest
-
Riki #3
Re: Dynamic controls button event in vb.net 2005
Postback on dynamically created controls only works on two conditions:
1) the control needs to be dynamically added again AFTER the postback as
well (this is obvious, but may be forgotten!)
2) the control should have exactly the same ID as before the postback. If
the number of controls after the postback has changed, and the ID's are
assigned by the ASP.NET server automatically, this may cause an ID mismatch
and therefore postback failure. Either make sure that the number of controls
is the same, or that you force the same ID on the control as before the
postback.
I hope this helps...
--
Riki
"sushil prasad" <sushil@dccnet.com> wrote in message
news:12lngnr1pt2vk14@corp.supernews.com...>I have created a control with some label, textbox and Button. On the click
> of the button the entries in textbox on the control is validated and a
> database table is updated. The button click event works when the
> control is placed directly on the panel from design window but not when i
> use
> programming to load the control.
> I need to be able to load the control dynamically into panel as this
> depends
> on some selection user does in main window.
>
> Here's how i load the control into panel:
>
> panel1.controls.add(page.loadcontrol("MyControl.as cx"))
>
> Thanks for help
>
> Sushil
>
>
>
>
Riki Guest



Reply With Quote

