Search Results

Search found 427 results on 18 pages for 'ascx'.

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

  • Dynamic Data: how to filter dropdown for foreign key on edit page

    - by Leonv
    I have Organisation with a foreign key to a Manager. Managers can be active, or inactive. On the Dynamic Data edit page for Organisation, I need to filter the dropdown for Manager to only show active records. I started out by making a custom version of DynamicData\FieldTemplates\ForeignKey_Edit.ascx and setting a UIHint to the new field template on Organisation.Manager. But, how to customize the linq or sql query that runs to load the Managers? Using Linq-to-SQL and DynamicDataFutures

    Read the article

  • SqlCacheDependency and output cache invalidation

    - by Rishabh Ohri
    Hi , Suppose I have a page abc.aspx in it I have a user control ucx123.ascx. I am fragment caching the user control and the cache is vary by param. The parameter is some id in the querystring. I want to add a sql cache dependency with respect to sql query. The scenario is I added the dependency but the cache is not invalidating

    Read the article

  • Ajax in UserControl

    - by nader
    Hi i have a signup page and i want to check username exists or not with ajax <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Simple.ascx.cs" Inherits="UserControls_Simple" %> ??? ??????: ???? ???? i eant to show label if user exists how can i do that? tnx

    Read the article

  • losing mvc intellisense

    - by freddoo
    Hi My intellisense doesn't work in aspx or ascx pages running mvc 1.0 When I save or build it does not show the intellisense, but if I do a clean then it works it this a bug or am I missing something ? thanks

    Read the article

  • Create designer.cs file programmatically

    - by Dinesh
    Hi All, Can somebody tell me how to create designer.cs file by using .net code. Basically what i want to do here is that i have a bunch of aspx and ascx files created by previous versions of vs.net that lacks designer files and now i want to create designer files for those. I can generate empty designer files but what i want is that my code should generate the designer file so that i can remove the extra code from cs files. Any help will be highly appreciated.

    Read the article

  • Iframe vs dynamically loading web user controls

    - by kevin
    I need some advice on techniques to perform page redirect in asp.net. Which one is more recommended to use in asp.net? Dynamically changed the src of the Iframe to difference aspx. Dim frame As HtmlControl = CType(Me.FindControl("frameMain"), HtmlControl) frame.Attributes("src") = "page1.aspx" Dynamically load web user controls to an asp:panel. panelMain.Controls.Clear() panelMain.Controls.Add(LoadControl("WebControl/page1.ascx")) (convert all aspx page to web user controls)

    Read the article

  • Add property to an ASP.NET MVC 2 ViewUserControl

    - by roosteronacid
    I have created a ViewUserControl in my ASP.NET MVC 2 project. This ViewUserControl serves as the general page-header for all views in the project. How can I add a custom property on ViewUserControls, accessible from views using that control?..: <%@ Register Src="../Shared/Header.ascx" TagName="Header" TagPrefix="uc" %> <uc:Header runat="server" ID="ucHeader" MenuItemHighlighted="Menuitem.FrontPage" /> <!-- custom property, here -->

    Read the article

  • ArgumentNullException when accessing a FormView instance

    - by David
    Background: I have an ASP.NET page which has a numebr of user controls within it. There are 2 user controls which are of interest. I need to display either one of them or neither of them, depending on the record selected previously. In the user controls I need to set properties of some controls which are in a FormView. So in my user control code-behind I have a number of properties which look something like this: Private ReadOnly Property phSectionReports() As PlaceHolder Get Return fvConfirmationReport.FindControl("phSectionReports") End Get End Property The problem: I am having problems with this Property. Sometimes it is returning Nothing/Null and sometimes it is throwing a NullArgumentException with the message "Value cannot be null. Parameter name: container". The exception is coming from trying to reference the fvConfirmationReport variable. fvConfirmationReport is the ID of my FormView in the page itself. So I am really after things to look for and if any ideas what sort of conditions (e.g stage in page cycle, etc.) might lead to this? An example stack trace is included below. ASP.NET 3.5 SP1, VB.NET Thanks, StackTrace: at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) at System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.GridView.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at System.Web.UI.WebControls.GridView.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) ...snip... at System.Web.UI.Control.DataBind() at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.WebControls.FormView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) at System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.FormView.PerformDataBinding(IEnumerable data) at System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) at System.Web.UI.WebControls.DataBoundControl.PerformSelect() at System.Web.UI.WebControls.BaseDataBoundControl.DataBind() at System.Web.UI.WebControls.FormView.DataBind() at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() at System.Web.UI.WebControls.FormView.EnsureDataBound() at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.FindControl(String id, Int32 pathOffset) at System.Web.UI.Control.FindControl(String id) at App_UserControls_xxx_ucConfirmationForm.get_phSectionReports() in ucConfirmationForm.ascx.vb:line 343 at App_UserControls_xxx_ucConfirmationForm.Page_Load(Object sender, EventArgs e) in ucConfirmationForm.ascx.vb:line 412 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() ...snip... at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Read the article

  • Iframe Vs Dynamiclly load web user controls

    - by kevin
    I need some advice on technique to perform page redirect in asp.net. Which one is more recommended to use in asp.net? Dynamically changed the src of the Iframe to difference aspx. Dim frame As HtmlControl = CType(Me.FindControl("frameMain"), HtmlControl) frame.Attributes("src") = "page1.aspx" Dynamically load web user controls to an asp:panel. panelMain.Controls.Clear() panelMain.Controls.Add(LoadControl("WebControl/page1.ascx")) (convert all aspx page to web user controls)

    Read the article

  • Why does ASP.Net rewrite relative paths in runat=server anchor controls?

    - by Atomiton
    I have UserControls in a Controls folder in my solution: /Controls/TheControl.ascx If specify the following: <a runat="server" href="./?pg=1">link text</a> ASP.Net seems to want to rewrite the path to point to the absolute location. For example, If the control is on site.com/products/fish/cans.aspx the link href will be rewritten to read <a href="../../Controls/?pg=1 Why does Asp.Net rewrite these control paths, and is there an elegant way to fix it?

    Read the article

  • WCF Troubleshooting from ASP.NET Client -- Help!

    - by Kobojunkie
    I am trying to call a method in my service that is as below, from an ASP.NET application. public bool ValidateUser(string username, string password) { try { // String CurrentLoggedInWindowsUserName = WindowsIdentity.GetCurrent().Name; // //primary identity of the call // String CurrentServiceSecurityContextPrimaryIdentityName = // ServiceSecurityContext.Current.PrimaryIdentity.Name; // } catch (Exception ex) { FaultExceptionFactory fct = new FaultExceptionFactory(); throw new FaultException<CustomFaultException>(fct.CreateFaultException(ex)); } return false; } The Config for the client end of my service is as below <binding name="WSHttpBinding_IMembershipService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="false" allowCookies="false"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /> <security mode="Message"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /> <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" establishSecurityContext="true" /> </security> </binding> Problem I keep having is when I call it; I get the following exception message. Server Error in '/' Application. The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. Stack Trace: [CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.] System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +7596735 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +275 System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout) +0 System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject. Close(TimeSpan timeout) +142 System.ServiceModel.ClientBase`1.Close() +38 System.ServiceModel.ClientBase`1.System.IDisposable.Dispose() +4 Controls.Membership.accountLogin.ValidateUserCredentials(String UserName, String Password) in C:\ Petition.WebClient\Controls\ Membership\accountLogin.ascx.cs:49 Controls.Membership.accountLogin.Login1_Authenticate(Object sender, AuthenticateEventArgs e) in C:\ WebClient\ Controls\Membership \accountLogin.ascx.cs:55 I am not entirely sure why I keep getting this. Just in case, here is how I call my service from the client private bool ValidateUserCredentials(string UserName, string Password) { bool boolReturnValue = false; using(Members.MembershipServiceClient client = new Controls.Members.MembershipServiceClient()) { try { boolReturnValue = client.ValidateUser(UserName, Password); } catch (FaultException<CustomFaultException> ex) { throw ex; } } return boolReturnValue; } Anyone have any idea what I need to do in this case?

    Read the article

  • locate label on content page

    - by VictorS
    I am trying to locate a label on a content page from within User Control(ascx) Page p = this.Page; //this line causes application to unload with no exception ContentPlaceHolder cp = (ContentPlaceHolder)p.Master.FindControl("Content2"); Label label = (Label)cp.FindControl("SomeLabel"); It just unloads itself with no exception mesage. Why does it happen?

    Read the article

  • VB - Convert Web Site to Web Application

    - by Dave
    Hi This is my first time doing VB :-) I've inherited a web site, which I've converted into a web application in VS2008. The conversion has worked for everything except a Gallery control. The compile error I'm getting is: Type 'Gallery' is not defined in file: gallery_oct07.aspx.designer.vb Option Strict On Option Explicit On Partial Public Class gallery_oct07 '''<summary> '''Gallery1 control. '''</summary> '''<remarks> '''Auto-generated field. '''To modify move field declaration from designer file to code-behind file. '''</remarks> Protected WithEvents Gallery1 As Global.Gallery End Class with squiggly lines under Global.Gallery. The gallery_oct07.aspx.vb is: Partial Class gallery_oct07 Inherits System.Web.UI.Page End Class Gallery.ascx is: <%@ Control Language="C#" AutoEventWireup="true" Codebehind="Gallery.ascx.cs" Inherits="WebApplication1.Gallery"%> <asp:Repeater runat="server" ID="rptGallery"> <HeaderTemplate> <ul class='<%#CssClass%>'> </HeaderTemplate> <ItemTemplate> <li><a href='<%#ImageFolder + Eval("Name") %>' class="thickbox" rel="gallery"><img src='<%#ImageFolder + "thumb/" + Eval("Name") %>' /></a></li> </ItemTemplate> <FooterTemplate> </ul></FooterTemplate> </asp:Repeater> and the code behind is: using System; using System.IO; namespace WebApplication1 { public partial class Gallery : System.Web.UI.UserControl { public string _ImageFolder; public string ImageFolder { get { return _ImageFolder; } set { _ImageFolder = value; } } private string _cssClass = "gallery"; public string CssClass { get { return _cssClass; } set { _cssClass = value; } } protected void Page_Load(object sender, EventArgs e) { DirectoryInfo dir = new DirectoryInfo(MapPath(ImageFolder)); FileInfo[] images = dir.GetFiles("*.jpg"); rptGallery.DataSource = images; rptGallery.DataBind(); } protected void Page_PreRender(object sender, EventArgs e) { } } } The feels like a namespace issue.. My project namespace is WebApplication1. Cheers!

    Read the article

  • Web Deployment Project builds files that are no longer part of the project

    - by Howard
    This is the error I get: Error 101 Could not load type 'control'. /Test.vbproj/x.ascx 1 1 WebDeployProject This is a left over file that was part of the project last week, but one of the developers deleted it from the project. I have to manually delete the file in order to get the WDP to build. Is there a way to tell the WDP to ignore the files that are not part of the project or to see that these files are not part of the project and delete them?

    Read the article

  • Sign out button reloads all user controls

    - by eych
    I have an aspx page with several user controls (ascx) as well as an asp:button for signing out. The click event of the button clears the session and does a response.redirect to the login page. However, before the click event is called, since the page posts back, all of the Page_Load events run for all of the controls. What is the best way to have the click event code run without unnecessary reloading of all user controls?

    Read the article

  • Page markup maintainability

    - by Tony
    Hi where js folder is under the root. if u put this JS ref in common\SomeControl.ascx, it will work fine if SomeControl is placed on ~/SomePage.aspx because SomePage is under the website root. How to put JS ref in SomeControl and allow it to be placed at any path on the website without losing the JS ref. Thanks

    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

  • Visual Studio highlighting source code in bold

    - by widgisoft
    While editing HTML/ASPX/ASCX etc; whenever I select an html tag, visual studio highlights the entire tag in black and bold; the black I'm not so fussed about but the bold changes the length of the line and really messes up the formatting. Is there a way to disable this? Thanks, Chris

    Read the article

  • DotNetNuke - Module settings disapear on new user control.

    - by jason clark
    Hi, I have a DNN module which renders a user control (view.ascx) All is ok ( I am logged in ) and I get the DNN settings menu. however when I add another control and load it like so: string url = Globals.NavigateURL(PortalSettings.ActiveTab.TabID, "View_Details", "mid=" + ModuleId.ToString()); Response.Redirect(url); I lose the settings link when the new control loads. Any ideas? Is there a property somewhere to turn on settings for the loaded user control?

    Read the article

  • asp:Button is not calling server-side function

    - by Richard Neil Ilagan
    Hi guys, I know that there has been much discussion here about this topic, but none of the threads I got across helped me solve this problem. I'm hoping that mine is somewhat unique, and may actually merit a different solution. I'm instantiating an asp:Button inside a data-bound asp:GridView through template fields. Some of the buttons are supposed to call a server-side function, but for some weird reason, it doesn't. All the buttons do when you click them is fire a postback to the current page, doing nothing, effectively just reloading the page. Below is a fragment of the code: <asp:GridView ID="gv" runat="server" AutoGenerateColumns="false" CssClass="l2 submissions" ShowHeader="false"> <Columns> <asp:TemplateField> <ItemTemplate><asp:Panel ID="swatchpanel" CssClass='<%# Bind("status") %>' runat="server"></asp:Panel></ItemTemplate> <ItemStyle Width="50px" CssClass="sw" /> </asp:TemplateField> <asp:BoundField DataField="description" ReadOnly="true"> </asp:BoundField> <asp:BoundField DataField="owner" ReadOnly="true"> <ItemStyle Font-Italic="true" /> </asp:BoundField> <asp:BoundField DataField="last-modified" ReadOnly="true"> <ItemStyle Width="100px" /> </asp:BoundField> <asp:TemplateField> <ItemTemplate> <asp:Button ID="viewBtn" cssclass='<%# Bind("sid") %>' runat="server" Text="View" OnClick="viewBtnClick" /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> The viewBtn above should call the viewBtnClick() function on server-side. I do have that function defined, along with a proper signature (object,EventArgs). One thing that may be of note is that this code is actually inside an ASCX, which is loaded in another ASCX, finally loaded into an ASPX. Any help or insight into the matter will be SO appreciated. Thanks! (oh, and please don't mind my trashy HTML/CSS semantics - this is still in a very,very early stage :p)

    Read the article

  • Fix for Visual Studio 2005 not showing filename or line on errors in web pages when compiling?

    - by spoulson
    A project I'm on requires Visual Studio 2005. One annoyance is that when a website project in the solution, any compile errors from .aspx or .ascx files show up like: (0,0): warning CS0168: The variable 'ex' is declared but never used (0,0): warning CS0162: Unreachable code detected (0,0): warning CS0168: The variable 'ex' is declared but never used (0,0): warning CS0168: The variable 'ex' is declared but never used How can I track these down? Is there an option I'm missing that gives me filename and line numbers?

    Read the article

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