Search Results

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

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

  • Control within ascx is null when ascx is added from codebehind

    - by Snoop Dogg
    I am having difficulties how to construct my question, but if I have to put it simply the situation is that I have categories of products. I have an aspx with a repeater on the left that lists the categories. And I want the products to be listed on the right. Category number is variable so I made an ascx with a DataList in it. When I try to do foreach category, ascx = new ascx(); then the DataList within this ascx control is null. ps: what I want to do is to preload all the products (thre is not much) and hide the divs and fadein fadeout them using jQuery when a category div is clicked. rightnow it is using jQuery.load(); and I don't like how the images load, cuz they download from top to bottom. Progressive gifs alsdo not an option. site demo is here http://techlipse.net/test/ledart Thanks a lot in advance...

    Read the article

  • Many ascx-to-one ascx.cs bug in VS2008

    - by pukipuki
    I'm developing second language support for the site. So I made duplicate .ascx and .aspx files for existing ascx.cs and aspx.cs Most of the time everything works fine.. but suddenly I'm getting: Type 'ctrl_car' exists both in 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rzhdengine\d072cc72\b9d5698b\App_Web_xdmblegv.dll', and in 'c:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rzhdengine\d072cc72\b9d5698b\App_Web_gkptrzo2.dll' (translated from russian) ctrl_car ctrl = (ctrl_car) LoadControl("car.ascx"); I have few such strings of code... and same error occurs with one of them. But WITHOUT any changes from me with those files. Sometimes it works on another VS... sometimes regetting project helps... but it is always waste of time (

    Read the article

  • Calling jquery function from ascx not working

    - by Metju
    Hi Guys, I'm having a problem with the following situation. I have an ascx which contains a submit button for a search criteria and I am trying to call a validation function in a js file I've used throughout the site (this is the first time I'm using it in an ascx). Now I've just tried this: <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript" src="js/jsAdmin_Generic_SystemValidation.js"></script> <script type="text/javascript"> $(document).ready(function () { $(".submitBtn").click(function (e) { alert("test"); alert($.Validate()); alert("test 2"); }); }); </script> The file is being referenced correctly as I am already seeing posts in Firebug that are done by it. This is the function: jQuery.extend({ Validate: function () { does validation... }); Now at first I was getting "Validate() is not a function" in firebug. Since I did that alert testing, I am getting the first alert, then nothing with no errors. Can anyone shed some light? Thanks

    Read the article

  • Configure OutputCache for ASCX from web.config's cache profiles

    - by zar
    Hello, To configure aspx pages' OutputCache from one place, there is a great tool which is the CacheProfile attribute in <%@ OutputCache % associated with a custom cache profile defined in the web.config : <caching> <outputCacheSettings> <outputCacheProfiles> <add name="myProfile" duration="300" /> </outputCacheProfiles> </outputCacheSettings> </caching> And the line : <%@ OutputCache CacheProfile="myProfile" VaryByParam="None" %> does the job. But how to do the same thing for ascx user controls ? CacheProfile isn't in <%@ OutputCache % :S Is there a workaround ? Thanks.

    Read the article

  • JSP or .ascx equivalent for Scala?

    - by Daniel Worthington
    I'm working on a small MVC "framework" (it's really very small) in Scala. I'd like to be able to write my view files as Scala code so I can get lots of help from the compiler. Pre-compiling is great, but what I really want is a way to have the servlet container automatically compile certain files (my view files) on request so I don't have to shut down Jetty and compile all my source files at once, then start it up again just to see small changes to my HTML. I do this a lot with .ascx files in .NET (the file will contain just one scriptlet tag with a bunch of C# code inside which writes out markup using an XmlWriter) and I love this workflow. You just make changes and then refresh your browser, but it's still getting compiled! I don't have a lot of experience with Java, but it seems possible to do this with JSP as well. I'm wondering if this sort of thing is possible in Scala. I have looked into building this myself (see more info here: http://www.nabble.com/Compiler-API-td12050645.html) but I would rather use something else if it's out there.

    Read the article

  • How to provide translations for items in a ASP.Net custom web control (.ascx)?

    - by paul
    How do I go about providing localised text for items in a custom web control? I had thought that I just need to add meta.resourcekey tags to the control items and then define and fill some resource files called mycontrol.ascx.[lang].resx but that doesn't seem to work. e.g. MyControl.ascx <asp:Label ID="Label1" meta:resourcekey="Label1" runat="server" Text="Oops!"></asp:Label> MyControl.ascx.de.resx Label1.Text Donner und Blitzen!

    Read the article

  • List of Objects to be used on ascx view with Inherits data already loaded MVC...

    - by user54197
    I have an object list being loded from a database to a drop down list. The Model loads the data to the Controller. The aspx view includes an ascx view. The ascx view already inherits data from another Project. I cannot set my List object in the ascx page. Can this be done? Model ... string List = dr["example"].ToString().Trim(); int indicator = dr["ex"].ToString().Trim(); LossCauseList.Add(new LossCauses(indicator, List)); ... Controller LossCauses test = new LossCauses(); test.GetLossCauses(LossType); TempData["Select"] = test.LossCauseList; return View(myData); Partial View ... <select id="SelectedProperty"> <% List<string> selectProperty = new List<string>(); selectProperty = TempData["Select"] as List<string>; foreach(var item in selectProperty) { %> <option><%=item.ToString() %></option> <% } %> </select> ... Partial view's List should be an actual LossCauses object. HELP!!!

    Read the article

  • ASP: Extend control (ASCX) and access base markup file from subclass code

    - by Pathoschild
    Hello, I'm building form validation controls for our C# ASP application. The bulk of the work is handled by a BaseValidator control (subclassing System.Web.UI.UserControl), which also has the markup for the validation output. This is then extended by subcontrols like PasswordValidator, that provides the Validate method and any extra fields needed by that validator control. (The end goal is to have controls like <uc1:PasswordValidator ControlId="txtPassword" /> which we can plop into any form with minimum duplication.) However, PasswordValidator.ascx.cs cannot access the form elements defined in BaseValidator.ascx; the only way I've found to do so is to duplicate the markup in each subcontrol's *.ascx file. How can I extend BaseValidator.ascx.cs and access BaseValidator.ascx's markup in the subclass?

    Read the article

  • Javascript code in ASP.NET MVC Partial Views (ASCX) or not?

    - by Alex
    Is there a "best practice" for placing Javascript code when you have many partial views and JS code that's specific to them? I feel like I'm creating a maintenance nightmare by having many partial views and then a bunch of independent Javascript files for them which need to be synced up when there is a partial view change. It appears, for maintenance purposes, better to me to put the JS code with the partial view. But then I'm violating generally accepted practices that all JS code should be at the bottom of the page and not mixed in, and also I'd end up with multiple references to the same JS file (as I'd include a reference in each ASCX for intellisense purposes). Does anyone have a better idea? Thank you!

    Read the article

  • ASP.NET ascx.cs via GET

    - by Heavy Bytes
    Say I have this url: http://site.example/dir/ In this folder I have these files: test.ascx.cs and test.ascx Just to be clear, I am not a .NET developer. From a security point of view - why can't I access http://site.example/dir/test.ascx.cs and how secure is it to keep those files there? I assume IIS filters out request that query these kind of files, but can someone explain me this? Thank you.

    Read the article

  • Basic refactoring features (e.g., Rename) unavailable when editing code in an aspx/ascx files

    - by DanM
    I was just editing some C# code between <% %> tags in an .ascx file, and I noticed that the Refactor contextual menu is unavailable. And even if I manually add items from this menu to a custom toolbar, they are disabled when viewing aspx/ascx files. I usually only have small snippets of C# code in my aspx/ascx files, but it would still be nice to be able to perform refactoring operations on any code that exists between <% %> tags. I feel like I'm going back to the dark ages when I have to use find/replace to change the name of a variable. Questions Is there a way to enable Visual Studio's refactoring features while viewing aspx/ascx files in Visual Studio? Are there any Visual Studio plug-ins (preferably free) that offer this kind of functionality?

    Read the article

  • asp.net mvc stand alone ascx control how do i link (css and js) most efficiently

    - by Julian
    Hi, I need some advice. I have developed some asp.net mvc web pages. Each page has a master and some ascx controls (between 2 - 6) embedded into it a js and css file. Up to now every thing was fine. In order to improve modularity, flexibility and testability the ascx's are now expected to be able to work as stand alone controls. (Each ascx has also got its own css and js files in some cases it has another control inside it) In order to meet this requirement we call the controller with the relevant parameters and it returns the ascx (partial) directly to the browser without all of the other parts of the original page . In order to get it to display correctly (css) and act correctly (js/jquery) all of the relevant files need to be added (as links or scripts eg. href="<%= ResolveUrl(styleSheet)%>") to the user control. This is "contradicting" the concept of positioning the files at the most logical place (could be the master page for example). How can I overcome this problem? Keep in mind that this is relevant for each "control" ascx file. Any thoughts will be appreciated.

    Read the article

  • Load ascx via jQuery

    - by Raika
    Is there a way to load ascx file by jQuery? UPDATE: thanks to @Emmett and @Yads.i am use the handler and the ajax: jQuery.ajax({ type: "POST", //GET url: "Foo.ashx", data: '{}', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { jQuery('#controlload').append(response.d); // or response }, error: function () { jQuery('#controlload').append('error'); } }); but i,m just getting an error. my ajax is wrong? Another Update : i am using error: function (xhr, ajaxOptions, thrownError) { jQuery('#controlload').append(thrownError); } and this what i get : Invalid JSON: Test =(this test is label inside my ascx) and my ascx file after Error!!! Another Update : my ascx file is somthing like this: <asp:DropDownList ID="ddl" runat="server" AutoPostBack="true"> <asp:ListItem>1</asp:ListItem> <asp:ListItem>2</asp:ListItem> </asp:DropDownList> <asp:Label ID="Label1" runat="server">Test</asp:Label> but when I call ajax i get this error in asp: :( Control 'ctl00_ddl' of type 'DropDownList' must be placed inside a form tag with runat=server.

    Read the article

  • Garbage collection of Strings returned from C# method calls in ascx pages

    - by Icarus
    Hi, For a web application developed on ASP.NET, we are finding that for user control files (ascx) we are returning long strings as a result of method calls. These are embedded in the ascx pages using the special tags <% %> When performing memory dump analysis for the application, we find that many of those strings are not being garbage collected. Also, the ascx pages are compiled to temporary DLLs and they are held in memory. Is this responsible for causing the long strings to remain in memory and not be garbage collected ? Note : The strings are larger than 85K in size.

    Read the article

  • Validating button click event using JS from inside ascx nested inside updatepanel

    - by Viswa
    Hello I have a button inside an ascx inside an update panel inside aspx content page. When the button is clicked i want it to run a JS function that causes to show a panel. Here is my Code. <pre> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if(val2 != 0) { switch(val2) { case 1 : document.getElementById('<%=pnl1.ClientID%>').style.visibility = 'visible'; break; } } return false; } </script> <asp:LinkButton ID="lbl1" runat="server" OnClick="return ShowPanel(1);">count</asp:LinkButton> I am not sue how to do this. Please help Update #1 - ABC.ascx is in updatepanel in the aspx page XYZ.aspx <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ABC.ascx.cs" Inherits="App.ABC" %> <script type= "text/javascript" language="javascript"> var val1=0; var val2=0; function ShowPanel(val2) { if (val2 != 0) { switch (val2) { case 1: document.getElementById("<%= this.pnl1.ClientID%>").style.display = "none"; break; } } return false; } </script> <div> <div style="text-align:center"> </div> <table style="width:100%; text-align:center; border-color:#99CCFF" border="3"> <tr style="text-align:left"> <td><asp:LinkButton ID="lbl1" runat="server" OnClientClick="return ShowPanel(1);">count</asp:LinkButton> </td> <td style="text-align:right"><asp:Button ID="btnHide1" runat="server" Text="hide" Height="18px" Width="32px"/> </td> </tr> <tr> <td colspan="2"><asp:Panel ID="pnl1" runat="server" Visible="false"> </asp:Panel> </td> </tr> </table> </div>

    Read the article

  • How to post only a specific ASCX partial instead of the whole page

    - by Hallaghan
    I've got an ASPX page rendering a search ascx page which in turn will fill a grid on the main ASPX page. Aside that, I've also got an ascx page which uploads files, like this: <form method="post" action="<%= Url.Action("UploadFile") %>" enctype="multipart/form-data"> <fieldset> <input type="file" name="file" id="file" /> <%=Html.ButtonSubmit("Upload") %> </fieldset></form> Here's the problem: imagine I have searched for a single entry to be displayed on the grid. The grid displays this single entry and after wards, I upload a file and press the button "Upload". The whole page gets posted and the content in the grid is lost, now displaying all the results available. What could I do to prevent this from happening, maintaining the grid state (we're not using ViewState) or otherwise not posting back the whole page but only the ascx with the file upload? Note: I'm new to MVC.

    Read the article

  • Hot to: user AutoCompleteExtender in a UserControl (ascx) and place the ServiceMethod on its code-be

    - by Shimmy
    Hi! I created a AutoCompleteExtender on a TextBox that resides on a UserControl (Control.ascx file). I don't want to create a separate class for the web method, i rather placing it in the code file (Control.ascx.cs) itself. Is there a way? I have successfully tried once ago placing the method on the same page but it was a page, and if ServicePath property is not set it's automatically refered to the page so it worked, now since it's a user control it doesn't even when I explicitly specify the path.

    Read the article

  • JQuery, ASCX and webmethods not seems to be working

    - by Karthik K
    Hi all, I have a cascading dropdown (3 of them) Type, Categories and Sub Categories. Type loads first and upon selection of Type, Category load and selection of Category, Sub Category loads. Also i have 2 buttons, "Add Category" and "Add Sub Category" Upon clicking on these buttons, i call a JQuery Modal Form to add them. I use Webmethod in code behind to add them to database This works perfectly in ASPX page. Since I need use this in 3-4 pages, i thought of making the above as User control (ASCX). When i try to use this in a webpage, the webmethods in ASCX don't get called. Is my approach correct? what should be done for my scenario lOoking forward for your suggestions. Thanks in advance Karthik

    Read the article

  • How to get parameters out of an ascx back to the main aspx page

    - by Hallaghan
    I've got an aspx page that renders an ascx page with filtering capabilities. Inside the ascx page, parameters are passed as follows: <tr> <td class="label">Plataforma</td> <td class="field lookup"><%= Html.Lookup("s.Site", null, Url, "Sites") %></td> </tr> <tr> <td class="label">Data</td> <td class="field date"><%= Html.TextBox("s.Date", DateTime.Today.ToString("yyyy-MM-dd")) %></td> </tr> I need to be able to get those parameters on the main aspx page, because they are needed for an action that is called there. How could I access these parameters?

    Read the article

  • Integrating Dynamics CMS with Sharepoint ASCX SecurityException Issue

    - by Gavin
    Hi, I've an ASCX control (WebParts aren't used in this solution) which interrogates CMS 4's data via the API provided by Microsoft.Crm.Sdk and Microsoft.Crm.SdkTypeProxy. The solution works until it's deployed to Sharepoint. Initially I received the following error: [SecurityException: That assembly does not allow partially trusted callers.] MyApp.SharePoint.Web.Applications.MyAppUtilities.RefreshUserFromCrm(String login) +0 MyApp.SharePoint.Web.Applications.MyApp_LoginForm.btnLogin_Click(Object sender, EventArgs e) +30 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 Then I tried wrapping the calling code in the ASCX with SPSecurity.RunWithElevatedPrivileges: SPSecurity.RunWithElevatedPrivileges(delegate() { // FBA user may not exist yet or require refreshing MyAppUtilities.RefreshUserFromCrm(txtUser.Text); }); But this resulted in the following error: [SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.] MyApp.SharePoint.Web.Applications.MyApp_LoginForm.btnLogin_Click(Object sender, EventArgs e) +0 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111 When I elevate the trust level in the Sharepoint site to full everything works fine, however I need to come up with a solution that uses minimal trust (or a customised minimal trust). I'm also trying to stay clear of adding anything to the GAC. Any ideas? I assume the issue is occuring when trying to call functionality from Microsoft.Crm.* Thanks in advance for any help anyone can provide. Cheers, Gavin

    Read the article

  • sharing web user controls across projects.

    - by Kyle
    I've done this using a regular .cs file that just extends System.Web.UI.UserControl and then included the assembly of the project that contains the control into other projects. I've also created .ascx files in one project then copied all ascx files from a specified folder in the properties-Build Events-Pre-build event. Now what I want to do is a combination of those two: I want to be able to use ascx files that I build in one project, in all of my other projects but I want to include them just using assembly references rather than having to copy them to my "secondary" projects as that seems a ghetto way to accomplish what I want to do. It works yes, but it's not very elegant. Can anyone let me know if this even possible, and if so, what the best way to approach this is?

    Read the article

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