Search Results

Search found 444 results on 18 pages for 'usercontrols'.

Page 2/18 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Update panel and usercontrols

    - by Charlie Brown
    I have two web user controls nested inside of an update panel. The events inside the user controls do not appear to trigger the panel. For testing, I have set the method the fires to sleep for 3 seconds, and added an update progress panel to the page. The update progress panel never comes up and the page reflashes as usual. The user controls work correctly and do what they need to do, but I would like to make them ajaxy and pretty. Is there a special method for adding usercontrols to an update so the postback works correctly? <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="100"> <ProgressTemplate> UPDATING...</ProgressTemplate> </asp:UpdateProgress> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div id="order"> <keg:BeerList runat="server" ID="uxBeerList" /> <kegcart:ShoppingCart runat="server" ID="uxCustomerCart" /> <br class="clearfloat" /> </div> </ContentTemplate> </asp:UpdatePanel> Protected Sub uxBeerList_AddItem(ByVal item As KegData.IOrderableItem) Handles uxBeerList.AddItem uxCustomerCart.AddItemToOrder(item) System.Threading.Thread.Sleep(5000) End Sub

    Read the article

  • Usercontrol access javascript from a Content's Page's Master Page

    - by Coda
    Hello all I have a problem. I have a masterpage that all of my Content pages inherit from. Within this masterpage I have a script tag pointing to the javascript file folder "~/Scripts/validation.js" On my content pages I use different usercontrols that require the use of many of the functions within the validation.js file however if I dont put the tag and the javascript functions within a contentholder on the contentpage the usercontrols do not see these functions and I get errors like "OnNameValidation" is not defined. Of course I can copy the javscript code into all of the pages but that's 30+ pages and a maintenance nightmare if I find a bug in one of the javscript functions. So the question (if you haven't already figured out from my long dissertation) is how can I declare the script tag with the path to the validation.js file so that contentpages and their usercontrols etc. can access the functions/code. Thanks in advance.

    Read the article

  • Getting namespace name not found for ASP.net user control

    - by Joel Barsotti
    So I'm having problems when I try to publish the website. I'm in visual studio 2008 sp1. I've got a bunch of user controls and on a few pages I'm using them programatically. I've got a reference on the aspx page <%@ Reference Control="~/UserControls/Foo.ascx" % Then on the code behing I use ASP.usercontrols_foo newFoo control = (ASP.usercontrols_foo)Page.LoadControl("~/UserControls/Foo.ascx"); If I navigate to the page it works fine, but when I goto publish the website I get a compile time error.

    Read the article

  • WPF MVVM UserControl Binding "Container", dispose to avoid memory leak.

    - by user178657
    For simplicity. I have a window, with a bindable usercontrol <UserControl Content="{Binding Path = BindingControl, UpdateSourceTrigger=PropertyChanged}"> I have two user controls, ControlA, and ControlB, Both UserControls have their own Datacontext ViewModel, ControlAViewModel and ControlBViewModel. Both ControlAViewModel and ControlBViewModel inh. from a "ViewModelBase" public abstract class ViewModelBase : DependencyObject, INotifyPropertyChanged, IDisposable........ Main window was added to IoC... To set the property of the Bindable UC, i do ComponentRepository.Resolve<MainViewWindow>().Bindingcontrol= new ControlA; ControlA, in its Datacontext, creates a DispatcherTimer, to do "somestuff".. Later on., I need to navigate elsewhere, so the other usercontrol is loaded into the container ComponentRepository.Resolve<MainViewWindow>().Bindingcontrol= new ControlB If i put a break point in the "someStuff" that was in ControlA's datacontext. The DispatcherTimer is still running... i.e. loading a new usercontrol into the bindable Usercontrol on mainwindow does not dispose/close/GC the DispatcherTimer that was created in the DataContext View Model... Ive looked around, and as stated by others, dispose doesnt get called because its not supposed to... :) Not all my usercontrols have DispatcherTimer, just a few that need to do some sort of "read and refresh" updates./. Should i track these DispatcherTimer objects in the ViewModelBase that all Usercontrols inh. and manually stop/dispose them everytime a new usercontrol is loaded? Is there a better way?

    Read the article

  • .NET Usercontrols telerik devexpress infragistics ComponentOne: who's best?

    - by petebob796
    I am considering the purchase of some .NET user controls with interest in both WinForms and asp.net. I have trialed in the past devexpress when I needed a hierarchical data grid for a personal project which I was impressed with. Rather than just jump for them I am interested in peoples experience of different products such as: TelerikDev ExpressInfragistics ComponentOne Any Others? I would like peoples opinions on: - Features Set and Number of Controls - Installation and Upgrade - Ease of use - Documentation - Price - License - Development (Updates to controls their side) Also if anyone has any links to review (hopefully side by side) please post them

    Read the article

  • creating new usercontrols at runtime in ASP.NET MVC

    - by Paul Connolly
    Hi everyone, My situation is that the user is creating an entity on my site which contains the particlars of the driectors of that company, name address etc.. The Director form is a separate user control with the appropriate textboxes etc. At run time we don't know how many of these directors there will be so I need one to be able to use something like an "ADD DIRECTOR" or "DELETE DIRECTOR" button which will present or delete the another usercontrol to add the additional director. Currently I am trying to make this happen within a pane of the JQuery Accordion control. I have looked many places for how to do this but to no avail. Can anyone tell me where I might find some inforamation about how I can do this? All the best Paul

    Read the article

  • MVVM in a canvas with usercontrols

    - by Mauro Destro
    I have a MVVM WPF application that basically wants to be a single line diagram designer for an electrical distribution network. I have a canvas that must contains transformers, circuit breaker, lines and cables. My big problem is the design... How can i start? I think about a DesignerView, DesignerViewModel that contains an ObservableCollection of IDesignerItemViewModel that is my base class for all the element. But in this case I have to use ItemsControl to bind the content of the canvas to my collection but the pros is that I don't have to create usercontrol for each element but i'll solve most of the problems with DataTemplate (i suppose). Each element viewmodel mantain a link to a model persisted in a repository where i mantain my logical tree. Any hint about how to proceed, I have looked at many DiagramCanvas example but all of those use simple items most like simple rectangle...

    Read the article

  • design time usercontrols - I can't see anything!

    - by taglius
    newbie question, please forgive... I'm developing a Wpf UserControl that will eventually be bound to a business object. The usercontrol is little more than a series of laid out TextBlocks, and perhaps (later) an image or two. As I'm laying out the usercontrol, I can put dummy text into all the TextBlocks so I can see what the usercontrol will look like, but as soon as I change the text property to contain the Binding information: <TextBlock Margin="0,12.8,42,0" Name="lblLastName" FontSize="8" Height="19" VerticalAlignment="Top" Text="{Binding Mode=OneWay, Path=LastName}"/> Then I can no longer see the textbox, or any "placeholder" text. This makes it very difficult to adjust the location and sizes of all the controls on the UserControl. In WinFormas programming, you could set binding information independently of the Text property, so you could at least see the Placeholder text during design time development. It's going to be pretty hard to visually arrange a bunch of invisible TextBlocks! What's the standard solution for this?

    Read the article

  • Nested Usercontrols and ViewState

    - by Bob Smith
    I have a UserControlParent that dynamically loads UserControlChild. In the UserControlChild, I store a value using the ViewState object by doing a ViewState["count"] = myCount; On Postbacks, the ViewState returns a null. Is this because the UserControlChild is being loaded dynamically? If it helps, the UserControlParent is loaded dynamically in the ASPX page as well.

    Read the article

  • MVVM - what is the ideal way for usercontrols to talk to each other

    - by Sandbox
    I have a a user control which contains sevral other user controls. I am using MVVM. Each user control has a corresponding VM. How do these user controls send information to each other. I want to avoid writing any code in the xaml code behind. Particularly I am interested in how the controls (inside the main user control) will talk to each other and how will they talk to the container user control. EDIT: I know that using events-delegates will help me solve this issue. But, I want to avoid writing any code in xaml code-behind.

    Read the article

  • Binding to an ObservableCollection of UserControls

    - by nlawalker
    Simple Silverlight question: I have an ObservableCollection<MyObject> in my viewmodel. Every MyObject has a Label property. If I bind a ListBox to the collection and set DisplayMemberPath to Label, or set the ItemTemplate to a TextBlock that binds the Text property to Label, all works as expected. If I change MyObject so it derives from a UserControl, the Label text no longer shows up in the ListBox; each item just shows up as a blank strip a few pixels tall. Why is this? There's obviously something I'm missing here about how different things get rendered.

    Read the article

  • Hundreds of custom UserControls create thousands of USER Objects

    - by Andy Blackman
    I'm creating a dashboard application that shows hundreds of "items" on a FlowLayoutPanel. Each "item" is a UserControl that is made up of 12 or labels. My app queries a database and then creates an "item" instance for each record, populating ethe labels and textboxes with data before adding it to the FlowLayoutPanel. After adding about 560 items to the panel, I noticed that the USER Objects count in my Task Manager had gone up to about 7300, which was much much larger than any other app on my machine. I did a quick spot of mental arithmetic (OK, I might have used calc.exe) and figured that 560 * 13 (12 labels plus the UserControl itself) is 7280. So that suddenly gave away where all the objects were coming from... Knowing that there is a 10,000 USER object limit before windows throws in the towel, I'm trying to figure better ways of drawing these items onto the FlowLayoutPanel. My ideas so far are as follows: 1) User-draw the "item", using graphics.DrawText and DrawImage in place of many of the labels. I'm hoping that this will mean 1 item = 1 USER Object, not 13. 2) Have 1 instance of the "item", then for each record, populate the instance and use the Control.DrawToBitmap() method to grab an image and then use that in the FlowLayoutPanel (or similar) So... Does anyone have any other suggestions ??? P.S. It's a zoomable interface, so I have already ruled out "Paging" as there is a requirement to see all items at once :( Thanks everyone.

    Read the article

  • Help with c# event listening and usercontrols

    - by Jen
    OK so I have a page which has a listview on it. Inside the item template of the listview is a usercontrol. This usercontrol is trying to trigger an event so that the hosting page can listen to it. My problem is that the event is not being triggered as the handler is null. (ie. EditDateRateSelected is my handler and its null when debugging) protected void lnkEditDate_Click(object sender, EventArgs e) { if (EditDateRateSelected != null) EditDateRateSelected(Convert.ToDateTime(((LinkButton)frmViewRatesDate.Row.FindControl("lnkEditDate")).Text)); } On the item data bound of my listvew is where I'm adding my event handlers protected void PropertyAccommodationRates1_ItemDataBound(object sender, ListViewItemEventArgs e) { if (e.Item.ItemType == ListViewItemType.DataItem) { UserControls_RatesEditDate RatesViewDate1 = (UserControls_RatesEditDate)e.Item.FindControl("RatesViewDate1"); RatesViewDate1.EditDateRateSelected += new UserControls_RatesEditDate.EditDateRateEventHandler(RatesEditDate1_EditDateRateSelected); RatesViewDate1.PropertyID = (int)Master.PropertyId; if (!String.IsNullOrEmpty(Accommodations1.SelectedValue)) { RatesViewDate1.AccommodationTypeID = Convert.ToInt32(Accommodations1.SelectedValue); } else { RatesViewDate1.AccommodationTypeID = 0; } RatesViewDate1.Rate = (PropertyCMSRate)((ListViewDataItem)e.Item).DataItem; } } My event code all works fine if the control is inside the page and on page load I have the line: RatesEditDate1.EditDateRateSelected += new UserControls_RatesEditDate.EditDateRateEventHandler(RatesEditDate1_EditDateRateSelected); But obviously I need listen for events inside the listviewcontrols. Any advice would be greatly appreciated. I have tried setting EnableViewState to true for my listview but that hasn't made a difference. Is there somewhere else I'm supposed to be wiring up the control handler? Note - apologies if I've got my terminology wrong and I'm referring to delegates as handlers and such :)

    Read the article

  • question on method of Scrolling multiple usercontrols

    - by fishhead
    I have a user condrol that may have several instances created and I am looking for the best option to handle the displaying and scrolling on my winform. in the past I have simply displayed them in a panel and scrolled the panel, but I thought this time around I would like to try something different. any sugestions would be welcome. Thanks

    Read the article

  • ajax delay load UserControl asp.net

    - by user196202
    regarding ajax delay load of usercontrols (or any controls) on Post at Encosia.com : http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/ I tried to implement it , but I noticed that it can be done only for simple controls or UserControls that Have simple asp.net controls (or html tags) . But when it involved with advanced dynamic ajax control (like ajaxControlToolkit or Telerik controls) that have javascripts inside them This method of injecting the html code to the .InnerHtml property of div tag (for example) IS NOT WORKING , and I red about it that The browser need to load the script on load and after that it won't iterperate the scripts injectd via .InnerHtml. So I attached here example of delay load project (from encosia.com by dave ward) with my modification (look at DefaultPopup.aspx and beforePopup.aspx and AfterPopup.aspx) Which I modified the RssReader to show listview with popup items (which is implemented via ACT HoverMenuExtender ) So in the regular way the popup items are shown right , but on the delay load which is done by creating virtual page for rendering the html and injecting it to .InnerHtml property – This ISN'T WORKING. So my question is : is there a way to do delay loading for controls which include scripts lik ACT and Telerik and others? And for the ajax templates – if I need to inject advanced control to the page – how I do it with your approach? Thanks very much (I can't attach here files so everyone please ask me by mail ([email protected]) and i'll send it to him. ) Zahi Kramer

    Read the article

  • Winforms: Enabling Localization by default

    - by Obalix
    Is there an easy way to set the Localizable property to true for newly created usercontrols / forms? The scope of the setting should ideally be a solution or a project. In other words I want to say that this project/solution should be localizable, and then if I add a new form or control VS should automatically set the property to true.

    Read the article

  • How to use multiple instances of a usercontrol (with jquery) on the same page

    - by Julian
    Hi All, I've been working on an usercontrol with a jquery timer in it. At first I had the jquery within the usercontrol. But when I add 2 of those controls to my page the second usercontrol isn't showing it's data very well. Now I've put the jquery into the mainpage and the usercontrol only uses the id's of the jquery. Here is my usercontrol: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %> <style type="text/css"> #mainpanel { width: 145px; height: 123px; } </style> <div id="mainpanel"> <div> test</div> <div id="shortly" style="background-color: #FFFFFF"> </div> <button id="resetButton"> Reset </button> </div> Mainpage: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Src="WebUserControl.ascx" TagName="WebUserControl" TagPrefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>hoi</title> <script src="Scripts/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="Scripts/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script> <link href="Css/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript" src="Scripts/jquery.countdown.js"></script> <script type="text/javascript"> $(document).ready(function () { $(function() { $("#mainpanel"); }); shortly = new Date(); shortly.setSeconds(shortly.getSeconds() + 5.5); $('#shortly').countdown({ until: shortly, onExpiry: liftOff, layout: '{sn}', }); $('#resetButton').click(function () { $('#mainpanel').effect("highlight", {}, 700 ); $('#shortly').effect("highlight", {}, 700 ); shortly = new Date(); shortly.setSeconds(shortly.getSeconds() + 5.5); $('#shortly').countdown('change', { until: shortly }); }); function liftOff() { // refresh the page window.location = window.location; } }); </script> </head> <body> <uc1:WebUserControl ID="WebUserControl1" runat="server" /> </body> </html> But still my usercontrols are acting weird, now my question is: "How can I make the SAME usercontrols work properly on ONE page?" Both of those use the same jquery code but the buttons etc. should only work within the usercontrol itself.

    Read the article

  • UserControl Focus Issue - Focus() sometimes returns false

    - by Craigger
    I have a user control that behaves similar to a tab control. The tab headers are UserControls that override Paint events to make them look custom. In order to leverage the Validating events on various controls on our tab pages, when the user clicks on the tab headers, we set the Focus to the TabHeader user control. I've noticed that Control.Focus() returns false sometimes but the documentation does not say why Control.Focus() will ever return false other than that the control can't receive focus. But I don't know why. Here's what i see. If my TabHeader UserControl does not contain any subcontrols, and I call myControl.Focus() from the MouseClick event, focus returns true. If my TabHeader UserControl contains a subcontrol, and I call myControl.Focus() from the MouseClick event, focus returns false. If my TabHeader UserControl contains a subcontrol, and I call myControl.subControl.Focus() from the myControl.MouseClick event, focus returns true. Can someone explain this?

    Read the article

  • Should I inherit from a stackpanel instead of a stack panel, grid or other UI element or UserControl

    - by Joel Barsotti
    So I'm building a peice of UI that might me in a dialog window or might be in embedded in part of a bigger page. I don't have alot of experience with WPF, but in ASP.NET you always used UserControls, because their wasn't anyt really generic UI inherit to inherit from (and in a way UserControl was just a div). My coworker has written alot of controls that inherit directly from stackpanel. That seems like a decent way of doing things. But when I went to create a control for the code I was going to write I was presented with a dialog that only included the UserControl, which I wasn't that familiar with in the context of WPF. So can someone explain to me the difference from building a control that inherits from user control vs inheriting directly from a stackPanel?

    Read the article

  • Getting a scriptmanager into a dynamically rendered page

    - by AndreasKnudsen
    Hi, We are rendering usercontrols dynamically like this: public string RenderControl(string pathcontrol) { string html; var page = new Page(); var control = page.LoadControl(path); page.Controls.Add(control); // do stuff to the control (give it some data to work on) using (var writer = new StringWriter()) { HttpContext.Current.Server.Execute(page, writer, false); html = writer.ToString(); } return html; } This lets us the same user controls when rendering pages normally as we do when rendering responses to ajax calls. However, when adding controls which themselves contain a scriptmanagerProxy we run into the problem that the newed up Page object doesn't contain either a ScriptManager or the HtmlForm in which the ScriptManager needs to run. Is there any way around this? Yours Andreas

    Read the article

  • User control blank on form in VS 2008

    - by Eric
    I've created a user control that contains a table layout control with various other standard controls like buttons and labels. Yet when I add the user control to one of my forms the control is blank. I've tried building the solution and a see the user-control flicker as if it's being updated, but it remains blank. Also if I actually run the program the usercontrol can not be see on the form. I've used usercontrols like this in the past. Is there something I'm missing?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >