Where would you unsubscribe events in a UserControl? I subscribe to it in the Load event, like I have done in forms. And in forms I would usually unsubscribe in the Closing event, but I can't find anything similar in the UserControl...
...
I have a page Product.aspx,there I have a user control ProductDisplay.ascx which has been created by drag and drop.
Now when a button is clicked in ProductDisplay.ascx,I want a logging function to be called which is in Product.aspx.
To achieve this I have used delegates
on ProductDisplay.ascx
public delegate void LogUserActivity(Prod...
ASP.Net 3.5
I want to create a user control that contains the ListView and DataPager controls along with some custom code in the ItemDataBound that is generic and deals with UI styling.
Ideally, when the developer uses this control, I would like to retain editor support so they can select a datasource, add/remove columns, etc...
Is ...
In The Page_Load event of an ASP.NET USercontrol, I have the following Code:
If Not Page.ClientScript.IsClientScriptIncludeRegistered("ProperCase") Then 'doesnt seem to work but no apparent harm.
Page.ClientScript.RegisterClientScriptBlock(GetType(String), "ProperCase", GetJavaProperCase())
End If
And here's a function...
Hi,
i am working on a project, with a set of usercontrols beeing loaded dynamically think about sort of a portal page with a bunch of widgets (blocks) and all of them are a usercontrol.
they have certain things in common, so i made them all derive from a masterBlock usercontrol
now is there a way to also have some output (in the .ascx...
I like the drag & drop feature of the skydrive file upload control. How do i go about developing a similar control?
...
Hi,
it seems my question http://stackoverflow.com/questions/1361261/asp-net-2-0-user-control-in-a-formview-needs-to-save-user-data-for-dummies is unlikely to get replies - I wonder why: did I miss someting? Is it too easy & obvious for you guys? Or too tough? (No, it can't be - I'd bet) Would you need more details? Sure, I didn't post a...
Hallo,
my team and I are about to start a project, and we would really like to use ASP.NET MVC, not the Web Forms. Why? Nothing special, just we want to learn it well and to measure what would be better to use in future projects.
But, our project has important request. We need ability to dynamically load user controls, that can be creat...
I tagged this with C# because that's what I'm working with. Might be true in VB, too. Doesn't really matter for me wiht this project, though.
Apologies in advance for the wordy-ness. If any one would prefer, I have a small project I mocked up to isolate this very weird behavior.
To observe:
1) Create a simple windows form project
2) ...
I need to place a user control into the template of a repeater control and reference data items from the repeater's datasource.
I tried (ignore the second cast which is specific to the CMS platform I'm using):
<%# ((EPiServer.Core.PageData)((RepeaterItem)Container.Parent.NamingContainer).DataItem)["PageName"]%>
But that throws back t...
Hi All,
I have a one more question on ASP.NET UserControl.
Assume I have a user control MyUserControl that exposes BufferCapacity property. The control internally maintains an array of size BufferCapacity. Now at design time I have shadowed this property. But if I change the proeprty, the value is not getting serialized in the *.aspx co...
I'd like to add a property which represents a collection of controls to a component and have a collection editor with which I can easily select the controls that belong to the collection. VS does almost what I want automatically with the following code:
Private _controls As New List(Of Control)
<DesignerSerializationVisibility(D...
Good afternoon all.
User Controls -- Do they serve a special purpose?
As far as I can tell they are no different to forms - they have the same toolbox and features.
Are there certain times when they are appropriate to use over forms?
It would be interesting to understand what they are good for.
Regards
...
I need to wrap text around a user control. Specifically, I am displaying an image in a user control. Normally, the align="right" would handle this on an image byu itself. But, put inside a user control, it doesn't seem to flow. I already tried putting the control in a div but this didn't look right either.
...
How can I create a binding to a sub-property of a specific element in a list?
I've created a class that exposes an IList property:
public IList<VideoChannel> VideoChannels {
get {
const int NumVideoChannels = 4;
return (new List<VideoChannel>(NumVideoChannels) {
new VideoChannel("Ch...
hello
while designing my user control, i encountered the following problem:
i would like to set the UserControl.CanGetFocus to false, which is not possible due an error message telling me that a control unable to receive focus can not contain elements who are able to receive focus.
but as i don't want them to actually receive any focu...
Hello,
I have several winforms listbox controls I am hosting in a user control. The behavior I want in this user control is that I only want ONE of the listboxes to have a selected item at a time.
So if I have an item in Listbox1 selected and I click an item in listbox2 listbox one should be automatically have all items deselected.
...
I have a user control which contains a StackPanel and TreeView.
All controls have the Height="Auto"
When I use the Cusotm control on a window and set Height, say Height=800
The STack Panel grows to this height, But the TreeView does not auto heigh adjust.
UserControl:
<UserControl x:Class="WPFDataBinding.ucCompanyTreeView"
xmlns="h...
Hello,
I'm looking for a RichTextBox with syntax highlighting!
Sounds easy but I'm searching since months and didn't find that what I need.
First I started to do it by myself... No good idea...
I tried to use this:
http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx
but that code don't hand...
Hello
I am written a User Control. in the User Control, There are Header and Footer.
i want insert gridview or any Control , in Content of the User control.
for a Example:
<Menu:Menu id="1" runAt="Server">
<Asp:GridView ...> /// or any control
</Menu>
Thanks
...