» Home » control » Page 1
How to call an event handler from one control to the another control where the second control is inside the first control?
Category : Programming Languages

i have a calender control like this


<asp:Calendar ID="CldrDemo" runat="server" BackColor="#FFFFCC" BorderColor="#FFCC66"
OnSelectionChanged="CldrDemo_SelectionChanged" OnDayRender="CldrDemo_DayRender">
</asp:Calendar>

OnDayRender event i have code like this


protected void CldrDemo_DayRender(object sender,

View Replies


ScriptManager.RegisterStartupScript fails with error “The control must be in the control tree of a page. Parameter name: control”
Category : Programming Languages

I'm creating a custom web control, basically extending RadTextBox since it doesn't have onBlur() event. I added a script in the .ascx file. I am trying to register the script but it fails. I'm not sure what I'm missing here.


<script language="javascript">
function handleLostFocus(o) {
aler(o.toString());
}
</script>
public part

View Replies


In a WPF user control, how do I specify coordinates relative to the control's total size, so that the control will scale correctly?
Category : Programming Languages

I have created this simple expand button user control with WPF:


        


I designed the thing with Width and Height both set to 100 so that I could see what I'm actually doing. The stripped-down XAML of this user control is:


<UserControl x:Class="Foobar.ExpandButton"
...

View Replies


Selecting and building a Control from a control library dynamically, using the control name from a table
Category : Programming Languages

I have a custom DDL that lives in my Server control library.


Currently I add this control to a table by strongly typing the name of the control, the customary way.


Control_Library.Report_NumberDDL newDDL = new Control_Library.Report_NumberDDL();

What I want to be able to do is dynamically create that control by pulling the control name from a ta


View Replies


Adding Control to Container Control that is in User Control - How to properly initialize?
Category : Programming Languages

Let's say I have a user control MyUserControl, which has a container control (it's a server control, but it could just be a Panel) and a dropdownlist. The dropdownlist is not in the container control initially. In it's code-behind, I am overriding OnInit and creating the user control, which includes populating a dropdownlist and adding that dropdownlist to my container control. I have a publ


View Replies


How to check if a control is child of another control? “Control.IsChildOf”
Category : Programming Languages

I have 3 panels:


<asp:Panel ID="ParentPanel" runat="server">
<asp:Panel ID="AnnoyingPanel" runat="server">
<asp:Panel ID="P" runat="server">
</asp:Panel>
</asp:Panel>
</asp:Panel>

How can I check if P is child of ParentPanel? Is there some LINQish wa


View Replies


Interview Question: When Control.InvokeRequired do you use Control.Invoke or Control.BeginInvoke?
Category : Programming Languages

I have had recently one of those really bad interviews, where they play good cop/bad cop with you. Whatever I replied wasn't good enough for one of them and my confidence was shrinking minute by minute. His final question that really confused me was the following:


if a control would need InvokeRequired would there be a difference in doing .Invoke or .BeginInvoke?


Let me


View Replies


Does a composite server control(inc. user control, custom server control) normally encapsulate css properties?
Category : Programming Languages

If a composite server control normally encapsulate styling information inside, it is an example of code encapsulation and modularization. However if css properties are included inside the composite control, it is not ideal for code/styling separation and css code re-use principles. Now which consideration should be the main consideration?


View Replies


How to add a reference to a method in a custom control to a child control created in that same custom control
Category : Programming Languages

I have a custom control that is based off the gridview control located at: here


The control is basically a gridview that automatically creates a column of checkboxes that can be used to "check" individual rows in the gridview.
During the gridview's "CreateColumns" event, the "checkboxcolumn" is created dynamically. The checkboxcolumn also contains another checkbox in the heade


View Replies


Dynamically add user control in page ON button click whic is also in user control (ModalPopExtender in user control)
Category : Programming Languages

I have a simple user control which I want to create dynamically every time user click button (button also saves data in db.) This is just a kind of Discussion forum where user reply and it appears beneath message.


When user click on Reply button a ModalPopupExtender window pops up and user enter its reply and submit.


When I click on submit in popup data get saved in db


View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .