Search Results

Search found 13 results on 1 pages for 'webusercontrol'.

Page 1/1 | 1 

  • 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

  • VS2008 loading designermode takes forever

    - by Younes
    Is there anything that can be done about the Designer mode for a ascx file taking forever to show? I'm currently waiting for like 1 minute and still nothing happened. This is not the first time i see this problem, the ascx file doesn't even have any components to show yet... The web user control is like empty and still it won't load. What can be the problem here?

    Read the article

  • ASP.Net event only being raised every other time?

    - by eftpotrm
    I have an ASP.Net web user control which represents a single entry in a list. To allow users to reorder the items, each item has buttons to move the item up or down the list. Clicking on one of these raises an event to the parent page, which then shuffles the items in the placeholder control. Code fragments from the list entry: Public Event UpClicked As System.EventHandler Protected Sub btnUp_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUp.Click RaiseEvent UpClicked(Me, New EventArgs()) End Sub And the parent container: rem (within the code to add an individual item to the placeholder) AddHandler l_oItem.UpClicked, AddressOf UpClicked Protected Sub UpClicked(ByVal sender As Object, ByVal e As EventArgs) MoveItem(DirectCast(sender, ScriptListItem), -1) End Sub It originally looked in testing like every other time the value for sender (verified by its properties) that reaches UpClicked is of an adjacent ListItem, not the one I've just clicked on - the first click is always wrong, then the second for the correct control. At present, testing appears to show that the button's click event is just being ignored every other time through. Breakpoints on the click events within the control simply aren't being hit, though the events are definitely being established. Why?

    Read the article

  • How To Find the Control or Page a User Control is Embedded In

    - by 5arx
    I've written a web user control which I want to be able to drop into the markup for either aspx pages or other web user controls. I need my user control to be able to easily and efficiently work out if its inside another user control or an aspx page. My initial idea is to do it recursively with checks on the Parent property - continue looking up the nesting hierarchy until I find either a web form or a user control - but I'm not sure this the best way of going about this. Can you suggest an easier way? thanks 5arx

    Read the article

  • ASP.NET UserControl Caching

    - by Adam
    Hi, This thing is driving me nuts. I have a UserControl that is called WebUserControl. I need to cache this control, so I put the following in the WebUserControl.ascx: <%@ OutputCache Duration="240" VaryByParam="FeedName" %> Then I have the Default.aspx file in which I have: <div class="divInnerLeft" id="L1" runat="server"> <uc1:WebUserControl FeedId="a1" ID="a1" runat="server" FeedName=""/> </div> <div class="divInnerMiddle" id="M1" runat="server"> <uc1:WebUserControl FeedId="a3" ID="a3" runat="server" FeedName=""/> </div> In the Page_Load event I set the FeedName property - according to the user preferences. The problem is that after initially loading the page, the controls are generated OK. But then, in the Page_Load event they are not available again. So the a1 and a3 are null and I cannot set the FeedName for different user. How to solve this? Thanks!

    Read the article

  • Problem deriving a user control from an abstract base class in website project

    - by Sprintstar
    In a Visual Studio website, I have created a user control. This control is derived from a class (in App_Code) that is itself derived from System.Web.UI.UserControl. This is an abstract class with an abstract method. I then try to implement that method in the user control, but I get the following errors from Visual Studio: Error 1 'WebUserControl.AbstractMethod()': no suitable method found to override C:\Users\User\Documents\Visual Studio 2010\WebSites\Delme\WebUserControl.ascx.cs 10 28 C:\...\Delme\ Error 2 'WebUserControl' does not implement inherited abstract member 'AbstractBaseClass.AbstractMethod()' c:\Users\User\AppData\Local\Temp\Temporary ASP.NET Files\delme\0eebaa86\f1a48678\App_Web_nrsbzxex.0.cs 14 Error 1 says that my override of the abstract method is invalid, it doesn't recognise the abstract method in the base class. Error 2 says that the partial class automatically built by asp.net doesn't implement the abstract method! Note that this works fine when the code is used in a Web Application project. Why is this happening?

    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

  • getting HtmlTextWriter of a control

    - by lissa
    is it possible to get HtmlTextWriter of a control? if no, then how can i call the RenderEndTag of a control in code behind? i am facing a problem in my application. i extended the listbox user control and override its RenderEndTag event. if i used the new listbox (Mylistbox) normally inside a WebPage, everything works fine. but when i put Mylistbox in a Webusercontrol and include the Webusercontrol in a WebPage, the RenderEndTag of the control is not called for some reason. so i guessed that i should explicitly call 'RenderEndTag' of the control. to do so i need to pass an HtmlTextWriter...

    Read the article

  • aspx listbox control

    - by lissa
    i tried to extend the listbox control and override its RenderEndTag method. everything works well if i used the control directly in a webapage. ie, the RenderEndTag is called. but when i try to put the control in a WebUserControl and use the webusercontorl in a webpage, the RenderEndTag of the extended control is not called. this is strange because the constructor is being called but the RenderEndTag method is not! any ideas about fixing the issue?

    Read the article

  • ChildControl of a childcontrol is null when calling from Main control

    - by Jan Schoenrock
    Hello I built a webusercontrol in asp.net which contains a databound dropdown. When I directly put this control into a webform it runs well. But if I try to add this control as childcontrol to another control at runtime Childcontrol childcontrol = new Childcontrol (); maincontrol.controls.add(childcontrol) , the dropdown of the childcontrol is not instatiated (is null) so that I run in an exception by trying to bind the data to the dropdown.

    Read the article

  • How to call windows authentication programmatically in sharepoint?

    - by HamdiKavak
    Hi guys, Here is my scenario. When anonymous user visits site collection's default site, custom login form panel is shown. This form is a webUserControl(.ascx file) that is embeded into page as webpart. Then user enters username and password. When submit button has been clicked, authentication will be handled by code behind of custom login form panel. Here is my question. How can I call SharePoint's authentication method with the username and password that is entered by user. Simply, I want users to login through my custom login form panel because default windows authentication window is looking really bad.

    Read the article

  • Is there any way that an export-to-Excel function can be scalable?

    - by MusiGenesis
    Summary: ASP.Net website with a couple hundred users. Data is exported to Excel files which can be relatively large (~5 MB). In the pilot phase (just a few users), we are already seeing occasional errors on the server in the exporting method. Here's the stack trace: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --- System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapacity(Int32 value) at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.TrackingMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.SparseMemoryStream.WriteAndCollapseBlocks(Byte[ ] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.CompressEmulationStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count) at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.IO.StreamWriter.Write(String value) at System.Xml.XmlTextEncoder.Write(String text) at System.Xml.XmlTextWriter.WriteString(String text) at System.Xml.XmlText.WriteTo(XmlWriter w) at System.Xml.XmlAttribute.WriteContentTo(XmlWriter w) at System.Xml.XmlAttribute.WriteTo(XmlWriter w) at System.Xml.XmlElement.WriteTo(XmlWriter w) at System.Xml.XmlElement.WriteContentTo(XmlWriter w) at System.Xml.XmlElement.WriteTo(XmlWriter w) at System.Xml.XmlElement.WriteContentTo(XmlWriter w) at System.Xml.XmlElement.WriteTo(XmlWriter w) at System.Xml.XmlElement.WriteContentTo(XmlWriter w) at System.Xml.XmlElement.WriteTo(XmlWriter w) at System.Xml.XmlDocument.WriteContentTo(XmlWriter xw) at System.Xml.XmlDocument.WriteTo(XmlWriter w) at System.Xml.XmlDocument.Save(Stream outStream) at OfficeOpenXml.ExcelWorksheet.Save() in C:\temp\XXXXXXXXXX\ExcelPackage\ExcelWorksheet.cs:line 605 at OfficeOpenXml.ExcelWorkbook.Save() in C:\temp\XXXXXXXXXX\ExcelPackage\ExcelWorkbook.cs:line 439 at OfficeOpenXml.ExcelPackage.Save() in C:\temp\XXXXXXXXXX\ExcelPackage\ExcelPackage.cs:line 348 at Framework.Exporting.Business.ExcelExport.BuildReport(HttpContext context) at WebUserControl.BtnXLS_Click(Object sender, EventArgs e) in C:\TEMP\XXXXXXXXXX\XXXXXXXXXX\OneList\UserControls\TicketReportExporter. ascx.cs:line 108 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.Rai sePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.XXXXXXXXXXX_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\XXXX\cdf32a52\d1a5eabd\App_Web_enxdwlks.1.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpAppli cation.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Even aside from this particular problem, in general exporting to Excel requires the instantiation of huge Excel objects on the server for each request, which I've always assumed to mean disqualifies Excel for "serious" work on a highly-loaded server. Is there any general way to export to Excel in a "light-weight" manner? Would simply streaming the data into a CSV file work for this?

    Read the article

1