Search Results

Search found 28345 results on 1134 pages for 'custom event'.

Page 95/1134 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • Cant get the catch statement to catch the custom exception

    - by user282807
    i have created a custom exception in the business layer and also using wcf layer where I am calling the methods in the business layer then in another website i am calling the method from wcf. i can see the message that i wrote in custom exception but the program goes staright to exception (the second catch block) instead of hitting my first catch block(where the custom exception is) when i hover over the exception i see my message but it's inside something called faultexception which i am not familiar with. and in there under details..there i see type= CanOnlyApplyOnceException. here is my code: protected void AddNewApplication() { try { using (var proxy = new ServiceReference1.ServiceClient()) { proxy.AddApplication(new Application { Credentials = 2, Comments = txtComments.Text, }); } } catch (CanOnlyApplyOnceException c) { ErrorSummary.AddError(c.Message, this); return; } catch (Exception) { lblStatus.Text = "There has been an error. Please try again"; } }

    Read the article

  • Winforms panel event after scroll

    - by Charlie boy
    Hello I have a panel in wich I do a bounch af rater complex drawing in the paint event. Since the drawing-code is kind of heavy, it gets rather twitchy when I scroll the panel, since the paint event is raised in such short intervals. My question is really this; Can i capture evnts such as "on scroll start" and "on scroll end" on a winforms control? If so, I could then just pause the drawing-code until the scroll is complete. Thanks in advance!

    Read the article

  • problem running system.net.webclient and process.start off a control event

    - by Rob
    The following code causes my vs 2008 wpf project to hang, I'm not sure why. Both Part 1 and Part 2 work perfectly fine independently, but when I run them together on an control event (click a button for example) the program hangs. I've also tried shell execute for part 2 - same results. However, this code when run within the form loaded event works fine. Any insights would be truly appreciated. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click 'Part 1 Dim myWebClient As System.Net.WebClient = New System.Net.WebClient Dim CurrentDataFileContents As String = myWebClient.DownloadString("http://www.xyz.com") myWebClient.Dispose() 'Part 2 System.Diagnostics.Process.Start("http://www.test.com") End Sub

    Read the article

  • WYSIWYG iframe editor and oninput event.

    - by teehoo
    I'm writing a simple WYSIWYG editor in an iframe, but having trouble registering the "oninput" event to detect when the user modifies the text field such as pasting in data etc. var txtArea = document.getElementById('txtArea'); txtArea.contentWindow.document.designMode="on"; txtArea.contentWindow.document.open(); txtArea.contentWindow.document.write("<head><style type='text/css'>body{font-size:13px;}</style></head><body>"+data.document+"</body>"); txtArea.contentWindow.document.close(); $([txtArea.contentWindow.document]).bind("click", updateCaretPosMouse); //fires $([txtArea.contentWindow.document]).bind("keyup", updateCaretPosKeyboard); //fires $([txtArea.contentWindow.document]).bind("input", textChanged); //doesn't fire If I create a plain old element, and add the "input" event to this, then it works. Do 'input" events not work with iframes WYSIWYG editors?

    Read the article

  • Calling Html.ActionLink in a custom HTML helper

    - by Sylvain
    I am designing a custom HTML helper and I would like to execute Html.ActionLink to provide dynamic URL generation. namespace MagieMVC.Helpers { public static class HtmlHelperExtension { public static string LinkTable(this HtmlHelper helper, List<Method> items) { string result = String.Empty; foreach (Method m in items) { result += String.Format( "<label class=\"label2\">{0}</label>" + System.Web.Mvc.Html.ActionLink(...) + "<br />", m.Category.Name,m.ID, m.Name); } return result; } } } Unfortunately Html.ActionLink is not recognized in this context whatever the namespace I have tried to declare. As a generic question, I would like to know if it is possible to use any existing standard/custom Html helper method when designing a new custom helper. Thanks.

    Read the article

  • Flex: Result event given multiple times

    - by Tom
    Hello everybody!! I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1 This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code? Tom protected function tryLogin():void { encryptStringResult.addEventListener('result', function(event:ResultEvent):void { var encryptString:String = event.result.toString(); Alert.show('Done'); }); encryptStringResult.token = auth.getEncryptString(); }

    Read the article

  • trigger onchange event manually

    - by Anitha
    Hi all, I'm setting a date-time textfield value via a calendar widget. Obviously, the calendar widget does something like this : document.getElementById('datetimetext').value = date_value; What I want is : On changing value in the date-time textfield I need to reset some other fields in the page. I've added a onchange event listener to the datetimetext field which is not getting triggered, because I guess onchange gets triggered only when the element gets focus & its value is changed on losing focus. Hence I'm looking for a way to manually trigger this onchange event (which I guess should take care of checking the value difference in the text field). Any ideas ? Thanks in advance, Anitha

    Read the article

  • ASP MVC 2 : Custom display of a required form element based on ModelMetaData

    - by Nigel
    I have an MVC 2 application that utilises forms. The required fields within the form are set using attributes that update the model metadata. The form fields are created using the MVC HtmlHelper method : Html.EditorFor. This works fine so far as validation is concerned, but it seems that by default the required fields are not displayed to the user (for example by appending a * to the control). If I wanted to provide some custom means of displaying this fact to the user (lets immagine I want to change the background colour of the edit control for example), where is the best place to do it. Would I need to create a custom html helper to replace EditorFor? I tried but it seemed difficult to gain access to the metadata for the correct property. I already have a custom ModelMetaDataProvider so there is no problem adding it there if that is the correct place.

    Read the article

  • Displaying Google Calendar event data on FullCalendar

    - by aurealus
    I am using Google Calendar as a storage engine for a calendar system I am building, however, I am using a single Google user account with multiple calendars, i.e. each user on my system has their own calendar within the one user account. I'm able to create a calendar per user just fine, but I would like to have FullCalendar retrieve the events for display purposes, without manually getting the magic cookie url from Google Calendar settings. I would like to be able to retrieve it programmatically or 'proxy' the feed via an authenticated call to get event data that I'm doing in Django. $('#calendar').fullCalendar({ events: $.fullCalendar.gcalFeed( "http://www.google.com/calendar_url/" <-- or /my/event/feed/url ) });

    Read the article

  • Spring 3 - Custom Security

    - by Eqbal
    I am in the process of converting a legacy application from proprietary technology to a Spring based web app, leaving the backend system as is. The login service is provided by the backend system through a function call that takes in some parameter (username, password plus some others) and provides an output that includes the authroizations for the user and other properties like firstname, lastname etc. What do I need to do to weave this into Spring 3.0 security module. Looks like I need to provide a custom AuthenticationProvider implementation (is this where I call the backend function?). Do I also need a custom User and UserDetailsService implementation which needs loadUserByName(String userName)? Any pointers on good documentation for this? The reference that came with the download is okay, but doesn't help too much in terms of implementing custom security.

    Read the article

  • jquery bind click event

    - by Adem
    I am having a problem with my code if (text.length < 1) { args.IsValid = false; $('#<% = cmdSaveRequest.ClientID()> %>').removeAttr('click'()); } else { $('#<% = cmdSaveRequest.ClientID()> %>').click(savingData()); args.IsValid = true; } when I assign click event like $('#<% = cmdSaveRequest.ClientID() %').click(savingData()); it executes the saving data function Is there any way to bind the click event to button but whiteout executing the function just bind it and after user clicks the button then the function executes?

    Read the article

  • jquery - loose click() event after ajax call ???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and close's upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • Accessing HTML 5 Video Progress Event with jQuery

    - by jnolte
    Hello All, The below is for an HTML5 video player event. My partner and I have been stumped for a very large portion of the day on this issue and hope someone can lend some insight on the issue. We have been able to access the progress event with plain js as seen below but when trying to access this with jQuery we get undefined in console. Any help/ recommendations are greatly appreciated. //JS - Works like a charm document.addEventListener("DOMContentLoaded", init, false); function init() { var v = document.getElementById('test-vid'); console.log(v) v.addEventListener('progress', progress, false); } function progress(e) { console.log(e.lengthComputable + ' ' + e.total + ' ' + e.loaded); } // jQuery - NO BUENO - Undefined rendered in console var vid = $('#test-vid'); $(vid).bind("progress", function(e){ console.log(e.total + ' ' + e.loaded + ' ' + e.lengthComputable ); }); Thanks in advance, JN

    Read the article

  • Firefox DOMContentLoaded event problem

    - by mck89
    Hi, i've created a script that works with the Dom so it has to wait until the Dom is ready before execute every operation. I want that this script can be included in two ways: In the head tag so that it is loaded before the Dom is ready. I've used document.addEventListener("DOMContentLoaded",function(){...},false) for this and it works well Loaded dinamically when the Dom is already loaded. In this case the script doesn't work because for some reasons if the Dom is already loaded the DOMContentLoaded event isn't fired So i want to know, is there a way to check if the Dom is already loaded so that the script can execute the code without using the DOMContentLoaded event?

    Read the article

  • .net Components ... a Custom Form

    - by carlos
    Hi, I've been working in the creation of some custom components adding functionalites to the basic components such as a Datagridview. Now I want to create a custom Form ... I mean, when I choose add new item in the VS menu, there is a Windows form and some varians of it like an about box, or Dialog, that are simple Forms with a custom controls already on it. I want to have a login form for my set of applications, so this login is avialable for all the development team to use it in the different modules. How can I develop the form and then add it to the "Add New Item" screen? Thanks !!!

    Read the article

  • Do a database query on Textbox onblur event

    - by user279521
    I am using asp.net 3.5 with C#. I need to do a database lookup when a user enters ProductID in txtProductID. I guess doing javascript is out of the question since this will have to be server side call. I wrote this code in the page_load event of the webpage: protected void Page_Load(object sender, EventArgs e) { txtProductID.Attributes.Add("onblur", "LookupProduct()"); } protected void LookupUser() { //Lookup Product information on onBlur event; } I get an error message: Microsoft JScript runtime error: Object expected How can I resolve this ?

    Read the article

  • Default Accessor Needed: Custom ConfigurationSection

    - by Mark
    I am totally confused by a simple Microsoft error message. When I run XSD.exe against an assembly that contains a custom ConfigurationSection (which in turn utilizes a custom ConfigurationElement and a custom ConfigurationElementCollection, as well as several ConfigurationProperties), I get the following error message: Error: There was an error processing 'Olbert.Entity.Utils.dll'. There was an error reflecting type 'Olbert.Entity.DatabaseConnection'. You must implement a default accessor on System.Configuration.ConfigurationLockCollection because it inherits from ICollection. Yet the class in question has a default accessor: public object this[int idx] { get { return null; } set { } } I realize the above doesn't do anything, but I don't need to access the element's properties by index. I'm just trying to work around the error message. So what's going on?

    Read the article

  • User Control's Page Init Event Not Firing After Another User Control Using

    - by Murat
    I have an user control. I add dynamicly control to this control on its Page Init. This user control's parent Page's every postback, its page init works fine. After I added an different user control to Page. In Second User control, user select photos and uploads them with asyncfileupload control(AJAX). And I save all of them with a button at the end of Page. In EveryPostBack Parent Page Load event works. If I dont select any photo from Second User Control, First User Control's Page Init event works fine when I click Save Button. But if I select a photo, first User Control dont work. What is the problem?

    Read the article

  • Problem in displaying custom UITableViewCell

    - by Vin
    Hi All, I have a tableview displaying data using a custom UITableViewCell(say cell1). On touch of a row, I change the custom cell to another custom UITableViewCell(say cell2). Also I increase the size of row of the selected cell to accomodate, more items of cell2. My problem is that the approach works fine when the number of rows in table view is less. When the number of rows increses, the rows expand on touching, but the data displayed is same as that of cell1. Cell2 doesn't seem to be loaded at all. Looking forward for a reply soon....Thanks in advance.

    Read the article

  • Are delegates copied during assignment to an event?

    - by Sir Psycho
    Hi, The following code seems to execute the FileRetrieved event more than once. I thought delegates were a reference type. I was expecting this to execute once. I'm going to take a guess and say that the reference is being passed by value, therefore copied but I don't like guesswork :-) public delegate void DirListEvent<T>(T dirItem); void Main() { DirListEvent<string> printFilename = s => { Console.WriteLine (s); }; var obj = new DirectoryLister(); obj.FileRetrieved += printFilename; obj.FileRetrieved += printFilename; obj.GetDirListing(); } public class DirectoryLister { public event DirListEvent<string> FileRetrieved; public DirectoryLister() { FileRetrieved += delegate {}; } public void GetDirListing() { foreach (var file in Directory.GetFiles(@"C:\")) { FileRetrieved(file); } } }

    Read the article

  • Extending a jquery plugins event callback

    - by Greg J
    I'm extending the functionality of a jquery plugin (foo) with another jquery plugin (bar). Essentially, the first plugin specifies an onReady(): var foo = $.foo({ onReady: function() { alert('foo'); }}); Foo is sent to bar as a parameter to bar: var bar = $.bar(foo); I want bar to be able to hook into foo's onReady event: (function($) { $.extend({ bar: function(foo) { var foo = foo; // How to do alert('bar') when foo.onready is called? } }); })(jQuery); I can override foo's onready event: foo.onready = function() { alert('bar'); } But I don't want to override it, I want to extend it so that I'll see both alerts when foo is ready. Thanks in advance!

    Read the article

  • onclick event not working after ie7 reload

    - by Charles
    I am using Javascript to dynamically create part of my page content. A routine that generates a set of img tags is called from the window.onload event. Those img tags are assigned attributes, including an onclick event. The img tags host thumbnail images that, when clicked, change the src property of the image in the main view div. Everything works properly in FF 3.5. I can reload the page and the dynamically generated onclick events continue to fire as expected. In IE7 everything works normally until I reload the page. At that point events that were hard coded into the xhtml section continue to work as expected, and the dynamically generated img tags are shown on the page, but their onclick events fail to work. How can I get IE7 to implement the dynamically generated click events on reload?

    Read the article

  • Event handling for keyboard strokes

    - by david
    Hey, I'm trying to get familiar with the whole keyboard event detection thing. Here's my sample code. <fx:Script> <![CDATA[ import flash.events.KeyboardEvent; import mx.controls.Alert; private function init():void{ addEventListener(KeyboardEvent.KEY_DOWN,reportKeyDown); } private function reportKeyDown(event:KeyboardEvent):void { Alert.show("a key was pressed"); } ]]> </fx:Script> As you can see, I'm at stage 0 of playing around with it, but it won't work. Anyone has any idea what I should be doing instead? Thanks

    Read the article

  • Bad event on java panel

    - by LucaB
    Hi I have a java panel with 4 buttons. When I click on of these buttons, a new frame appears and the first is hidden with setVisibile(false). On that new window, I have another button, but when i click it, I got the event corresponding to the fourth button of the first window. Clicking the button again does the trick, but of course this is not acceptable. Am I missing something? I just show the frames with nameOfTheFrame.setVisible(true); and I have MouseListeners on every button. The code of the last button is simply: System.exit(0); EDIT Sample code: private void btn_joinGamePressed(java.awt.event.MouseEvent evt) { GraphicsTools.getInstance().getCreateGame().setVisible(false); GraphicsTools.getInstance().getMainPanel().setVisible(false); GraphicsTools.getInstance().getRegistration().setVisible(true); } GraphicsTools is a Singleton.

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >