Search Results

Search found 918 results on 37 pages for 'usercontrol'.

Page 9/37 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • asp.net mvc making delete usercontrol information passing on and off

    - by mazhar kaunain baig
    i am creating a generalize deleteusercontrol , my aim is that on the listing page where all the records are listed when the delete is pressed i want to display the acknowledgment on the same page up the list. I had little idea to do that q1) first of all where will i place my deleteusercontrol(in the shared folder?). q2) on and off the deleteusercontrol as the acknowledgment will not be there all the time how would i be doing that on delete press. i don't want to pass any data in the querystring. q3)how would i be passing the records list id and listname to the general deleteusercontrol as it would be same for all the listing

    Read the article

  • How do display a UserControl with satisfying all imports

    - by Yost
    Dear SO, I'm having some issues with Silverlight 4/ MEF. I have a basic framework setup with a Silverlight Navigation app at the core. Image link to the diagram for clarification The main app (Desu) contains some pages and controls that export en import nicely. I dynamicly load controls from Desu.Controls(like an imageviewer which i identify with the IImageViewer interface) and some pages from Desu.Pages. The first problem I had was with dynamicly loading pages and being able to navigate to these pages (eg. use dummyhttp://blagh/desutestpage.aspx#/Activation when Desu.Pages was loaded from the xap). I solved this by using a custom MetaAttribute and a custom contentloader. Now for the question part: I want to load the ImageViewerControl from Desu.Controls in HomePage in Desu. I haven't loaded the Desu.Controls into the package though. When i try to load the control it gives me CompositionException because it can't satisfy the ImageViewControl import. I tried setting AllowRecomposition=true but that didn't help. So is it possible to load a control without satisfying all imports and, if yes, how does one do this?

    Read the article

  • Can I trigger an Update Panel from a Drop Down list in a User Control

    - by Jisaak
    I have a user control in a master page with two drop down lists. When the user selects an item out of either ddl, I want to load a specific user control inside an update panel on the content page. I know how to load the controls in the update panel, but I can't figure out how to get the user control to trigger the update panel. Any suggestions are very much appreciated.

    Read the article

  • C# Winform: Full Screen UserControl

    - by Mohsan
    hi. i have an application with main form. the main form has menu and some toolstrip and one usre control set the dock to Fill. how can i provide full screen view so that usre control set to full screen and all menu and tooltrips hide from main form.

    Read the article

  • Set Window Properties based on Datatype of UserControl

    - by Kage
    I've got a simple window, that is container for various views. I've got a DataTemplate that shows the correct view based on whatever the window's MainViewModel property is set to. <DataTemplate DataType="{x:Type VM:StartupViewModel}"> <AdornerDecorator> <V:StartupView /> </AdornerDecorator> </DataTemplate> What I'd like to do is for certain views, change some properties on the base window, ie WindowStyle, ResizeMode etc. something like triggers, but on datatypes instead of property values? How could I accomplish this?

    Read the article

  • Javascript image change causes embeded UserControls to flicker

    - by Sam Barham
    I have a n html page being displayed in IE. It has some buttons made up of images with mouseover/mouseout events on them in JavaScript, and a bunch of embedded .Net UserControls. When the mouseover/mouseout events fire, I change the images src to something else (simple rollover effect). The problem is that the UserControls often (but not always) flicker when this happens. To be clear, the images don't flicker, and the rest of the page doesn't flicker, just the embedded controls. This page is local, not coming from a server or anything. So, any ideas? More information : I've noticed that highlighting text does it too...

    Read the article

  • binding a usercontrol to the opposite of a bool property

    - by SnOrfus
    Pretty straightforward: I'm looking to do the same as this but in winforms. Everything that google seems to pull up is wpf specific (ie. I don't want to reference presentationframework.dll) Explained if you don't want to read the link: The following is a representation of the intent of what I'd like to do, though it obviously doesn't work. CheckBox1.DataBindings.Add(new Binding("Checked", this.object, "!SomeBool"));

    Read the article

  • ValidationProperty not returning entered value for textbox in custom ontrol

    - by nat
    hi I have a custom control, (relevant code at the bottom) it consists of some text/links and a hidden textbox (rather than a hidden input). when rendered, the user via another dialog and some JS sets the value of the textbox to an integer and clicks submit on the form. i am trying to assure that the user has entered a number (via the JS) and that the textbox is not still set to its default of "0" the requiredfieldvalidator works just fine, if i dont change the value it spots it on the client and fills the validation summary on the page with the appropriate message. unfortunately when i do fill the textbox, the validator also rejests the post as the controls textbox text value is still set to "0", even though on the form it has changed. clearly i am doing something wrong.. but cant work out what it is? could someone enlighten me please, this is driving me potty if i step through the code, when the get of the mediaidtext is hit,the findcontrol finds does not the textbox, if i inspect the controls collection however i can find the textbox, but its value is still "0" it also seems that when findcontrol is called, the createchildcontrols is called again - thus resetting the value back to "0" there.. ! how can i ever assure the control realises that the textbox value has changed? many thanks code below nat [ValidationProperty("MediaIdText")] public class MediaLibraryFileControl: CompositeControl { private int mediaId = 0; public int MediaId { get { return mediaId; } set { mediaId = value; } } public string MediaIdText { get { string txt = "0"; Control ctrl = this.FindControl(this.UniqueID+ "_hidden"); try { txt = ((TextBox)ctrl).Text; MediaId = Convert.ToInt32(txt); } catch { MediaId = 0; } return txt; } } protected override void CreateChildControls() { this.Controls.Add(new LiteralControl("<span>")); this.Controls.Add(new LiteralControl("<span id=\"" + TextControlName + "\">" + getMediaDetails() + "</span>")); TextBox tb = new TextBox(); tb.Text = this.MediaId.ToString(); tb.ID = this.UniqueID + "_hidden"; tb.CssClass = "hidden"; this.Controls.Add(tb); if (Select == true) { this.Controls.Add(new LiteralControl(string.Format("&nbsp;[<a href=\"javascript:{0}(this,'{1}','{2}')\" class=\"select\">{3}</a>]", dialog, this.UniqueID, this.categoryId, "select"))); this.Controls.Add(new LiteralControl(string.Format("&nbsp;[<a href=\"javascript:{0}(this,'{1}')\" class=\"select\">{2}</a>]", clearDialog, this.ID, "clear"))); } this.Controls.Add(new LiteralControl("</span>")); } protected virtual string getMediaDetails() { //... return String.Empty; } } this is the code adding the validationcontrol the editcontrol is the instance of the control above public override Control RenderValidationControl(Control editControl) { Control ctrl = new PlaceHolder(); RequiredFieldValidator req = new RequiredFieldValidator(); req.ID = editControl.ClientID + "_validator"; req.ControlToValidate = editControl.ID; req.Display = ValidatorDisplay.None; req.InitialValue = "0"; req.EnableClientScript = false; req.ErrorMessage = "control cannot be blank"; ctrl.Controls.Add(req); return ctrl; }

    Read the article

  • Problems with overriding OnPaint and grabbing mouse events in C# UserControl containing other controls

    - by MoreThanChaos
    I've made a control which contains few other controls like PictureBox, Label and TextBox. But I'm having two problems: 1. I tried to paint some things on top of my control and when I'm overriding OnPaint, it results that things I try to draw are under controls that my control contains. Areas on which I would like to draw intersect with controls in ways that are not easy to predict. I mean that it includes something drawn on controls inside as well as on base of control. Is there a simple way to draw something on top of all contents of my control? Setting ForeColor to Transparent isn't a solution that would help me much. 2. I have a problem with grabbing mouse click events when I place my control on a form and add click event handling. It only works when I click on an area not occupied by controls inside. I would like the whole control to react to clicks and other actions like it was one consistent control. How can I redirect/handle these clicks to make them work the way I want? Thanks in advance for any tips

    Read the article

  • Add a usercontrol as the value of a html attribute

    - by dmadden
    I am working in a CMS where we use tokens ( which is turned into a user control. Is there a way to add the user control into an attribute value for our template style? example : <div class="<$tokenName/$>" / this currently outputs an encoded user control, which is then not parsed by IIS.

    Read the article

  • Passing in a value to a usercontrol through a foreach loop

    - by LooDaFunk
    in my asp.net mark up I have a foreach loop that iterates through a simple list. In this foreach loop I am adding a new user control and attempting to pass in the value from the loop. However, this value just wont budge and get inside that damn control! Anyone have any suggestions? <%foreach (userInfo i in this.items) { %> <uc1:ItemControl ID="ItemControl" runat="server" UserID='<%#Eval("userID") %>'/> <%} %> userID is a public property in the control, when it goes to set, the value is just literally : <%#Eval("userID") %. I've tried #Bind and =Value but nothing seems to work. Any help would be appreciated!

    Read the article

  • Asp.Net - UserControl - Inherit from MasterPage

    - by Melursus
    Is it possible for an user control (ascx) to doing something like herit from a MasterPage ? My point is, in one of my user control (only use by one kind of MasterPage), I would like to use an <asp:content> tag, but I can't, I can only in the page that use that user control... So, I have to repeat some code into each of the page that use that user control...

    Read the article

  • How can I create and call a javascript function on a dynamically loaded user control?

    - by Ratan
    when i try to call a javascript function in a dynamically loaded user control, it cannot find the function specified. I have a user control for organizationDetails.ascx. In there, I am using modal popup extender to get some information from the user and then i verify the address through google and suggests the proper format. I am trying to use a java script for a function called for onBlur of a textbox but the mozilla firebug says that the function is not defined, which is not the case. It would be great if someone can help me out here.

    Read the article

  • Display the same prev/next usercontrol twice on a page

    - by Scott
    I haven't seen a question like this. I have a prev/next paging control on my page, one at the top and one at the bottom like this: top pager product catalog bottom pager Each pager is bound to a PagedDataSource that is exactly the same. I don't want to duplicate effort, so I am trying to figure out a way to do the processing once, but show the control twice.

    Read the article

  • Why is my user control not instanciated on a postback?

    - by Antoine
    Hi, I'd like to set the trigger of an UpdatePanel to a user control outside the UpdatePanel on the same page . The user control is added at design time, not at runtime. If I statically declare the trigger, I get an error "A control with ID 'xx' cannot be found for the trigger in UpdatePanel". I tried to add the trigger at runtime in Page_Init or Page_Load, but it fails with the user control being null, although it has ViewState enabled. Has someone an idea on how to solve this? Here is the code of the user control: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ComponentDropDownControl.ascx.cs" Inherits="ComponentDropDownControl" EnableViewState="true" %> <asp:DropDownList ID="ComponentDropDown" runat="server" DataSourceID="ComponentFile" DataTextField="name" DataValueField="name" OnSelectedIndexChanged="ComponentDropDown_SelectedIndexChanged" AutoPostBack="True" EnableTheming="True"> </asp:DropDownList><asp:XmlDataSource ID="ComponentFile" runat="server" DataFile="~/App_Data/Components.xml" XPath="//component"></asp:XmlDataSource> And here it is in the aspx page: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="create.aspx.cs" Inherits="create" Title="Create task" %> <%@ Register Src="ComponentDropDownControl.ascx" TagName="ComponentDropDownControl" TagPrefix="uc1" %> ... <uc1:ComponentDropDownControl ID="CustomComponentDropDown" runat="server" EnableViewState="true" /> In the Page_Load function of the aspx page, the following lines work at first time, but fail on the first PostBack (line 2, CustomComponentDropDown is null). AsyncPostBackTrigger trigger = new AsyncPostBackTrigger(); trigger.ControlID = CustomComponentDropDown.UniqueID.ToString(); UpdatePanel1.Triggers.Add(trigger);

    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

  • accessing php javascript object in asp.net user control

    - by Khushi
    Hi, I have a website in php which is using 4 frames(top, left, middle and right). The middle frame contains the web user control coded in asp.net. Now, in the right frame( which is coded in php ) some javascript contains the id of the items selected in right frame. I need to get those ids to the middle frame on asp.net user control. How can i do this?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >