Search Results

Search found 59301 results on 2373 pages for 'asp net ajax'.

Page 52/2373 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • Browser not handling exception from AJAX panel, ASP.NET c#

    - by Grant
    Hi, i am having trouble catching errors in an AJAX panel. Even when i throw an exception in the c# code behind the front end completely ignores it. Here is the code i have setup, can anyone see why? I ideally want to show a js alert window on error. Code Behind: protected void btnX_Click(object sender, EventArgs e) { throw new ApplicationException("test"); } protected void ScriptManager_AsyncPostBackError(object sender, AsyncPostBackErrorEventArgs e) { ScriptManager.AsyncPostBackErrorMessage = e.Exception.Message; } Markup: <script type="text/javascript" language="javascript"> Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); function EndRequestHandler(sender, e) { window.alert(e.get_error().name); } </script> <asp:ScriptManager ID="ScriptManager" runat="server" AllowCustomErrorsRedirect="true" OnAsyncPostBackError="ScriptManager_AsyncPostBackError" />

    Read the article

  • AJAX Autocomplete appears at a random vertical position, not touching the textbox

    - by Tim
    Hi, I am using the AJAX Autocomplete extender for ASP.NET 2. Everything works fine...I am calling a webservice which gets me the values to fill the drop down with after 3 letters are typed into certain es. I have set the maxheight attribute and am using a scrollbar in case there are more entries than would fit that height. However, I notice that in some cases, the drop down appears at a random position on the screen, i.e. rather than connected to the relevant textbox, sometimes it appears with its entries above the textbox, not touching it at all. Sometimes it would have just one entry and it would appear in the middle of the screen vertically above the textbox it is associated to. Is there a reason why this is happening?

    Read the article

  • 2 ajax forms on the same page posting same textbox

    - by rod
    Hi All, Is it possible to post, say like a value in a textbox, to 2 different ajax forms that are on the same page? It doesn't have to be at the same time? What I'm trying to do is this: I have a search page that searches for customers and displays them on a paged grid. Users can specify up to 5 parameters (5 textboxes) to narrow the search. On the same page I have an export option. Well since I want all the customers for the search and not just the paged data I need a way to post back to the server for this option passing the same parameters used in the grid. I'm using a ViewModel which would be nice if I can pass that back to the server rather than the individual search fields that are backed by the view model. Thanks, rodchar

    Read the article

  • AJAX Panel not throwing exceptions

    - by Grant
    Hi, i have just noticed something strange in some asp.net markup. I have a standard form with a couple of textboxes and a submit button. When clicked the code behind will attempt to perform some logic and then return. If the input values are not valid it used to throw an exception. The moment i wrapped the controls in an AJAX update panel and try to submit bad data, no exception is thrown and the panel returns like nothing was wrong. Does anyone know how to return this to the previous behavior whilst keeping the update panel?

    Read the article

  • Request format is unrecognized for URL unexpectedly ending exception in web service.

    - by Jalpesh P. Vadgama
    Recently I was getting error when I am calling web service using Java script. I searching on net and debugging I have found following things. Any web service support three kinds of protocol HttpGet,HttpPost and SOAP. In framework 1.0 it was enabled by default but after 1.0 framework it will not be enabled by default due to security issues and WS-Specifications. So we have to enabled them via putting configuration settings in web.config. Here is the code for that. <configuration> <system.web> <webservices> <protocols> <add name="HttpGet"></add> <add name="HttpPost"></add> </protocols> </webservices> </system.web> </configuration> Hope this will help you. Stay tuned for more. Till that Happy programming!!!. Technorati Tags: WebService,Request,Javascript,Ajax

    Read the article

  • ASP.Net MVC 1.0 Web Hosting

    - by Saravanan I M
    I am developing a website using ASP.Net MVC 1.0. Can i host that website on a server having ASP.Net 2.0? Because my hosting provider supports only ASP.Net 2.0. Does anyone know how to host a website developed using ASP.Net MVC 1.0 in a web server supports ASP.Net 2.0

    Read the article

  • asp.net ajax toolkit combobox dosen't work in hidden div

    - by sam
    i have a combobox inside a hidden div which i use css display = none to make it invisible, but when i make the div visible by setting display = block, the combobox just show the input and its button and ul list all have css as display = 'none', visibility ='hidden', i can tell it is done by combobox inbuild javascript because i tried to use javascript to set the css manually with no luck. It is a bug of combobox, urgent help needed, i spent a week to solve this, and our team put a lot trust on the toolkit ,please help me on this all javascript gurus , thanks. Admin please let my code sample be visible , thanks a lot. below is the code to reproduce the bug, run it you cant see the dropdown: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" % <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" % a d f click me <script type="text/javascript"> function show() { var d = $get('d'); d.style.display = 'block'; } </script>

    Read the article

  • Rebinding events in jQuery after Ajax update (updatepanel)

    - by Hojou
    I have several input and option elements on my page, each (well almost) have an event attached to update some text on the page once they change. I use jQuery which is really really cool :) I also use Microsofts Ajax framework, utilizing the UpdatePanel. The reason why I do that is that certain elements are created on the page based on some server-side logic. I don't really want to explain why I use the UpdatePanel - even if it could (it can with quite some effort) be rewritten to use only jQuery I still want that UpdatePanel. You probably guessed it - once I have a postback on the UpdatePanel the jQuery events stops working. I actually was expecting this, since the "postback" is not really a new postback so my code in document.ready that binds the events won't be fired again. I also confirmed my suspicion by reading up on it in the jQuery help libraries. Anyway I'm left with the problem of rebinding my controls after the UpdatePanel is done updating the DOM. I preferably need a solution that does not require adding more .js files (jQuery plug-ins) to the page but something as simple as being able to catch the UpdatePanel's 'afterupdating' where I can just call my method to rebind all the form elements.

    Read the article

  • asp.net ajax control toolkit combobox displays incorectly when in fieldset with style of position:re

    - by Jon P
    I currently have an Instance of the ASP.net ajax control toolkit combo box residing in a field set with a style of position:releative applied. The control also sits in a very plain table (please no comments about using tables for lay-out, I know it is evil and try to avoid it). There are two problems with the display of the list: The list does not sit flush with the text box. In I.E. 7 (which is the majority of my target audience, intranet where IE7 is the company standard) the list display about 10px below the fieldset, which is what the bottom margin of the fieldset is set to. In FF 2.0 the list sits sinificantly lower and off-set to the right. Below the filed set there is more content in a div, also with a style of position:relative applied. The list from the combo box displays behind the content of this div, which is obviouly an issue. Removing position:releative from the fieldset resolves the display issue of the combo box, but results in other unwanted display side effects. My interim workaround is to specifically restyle this fieldset without the position:absolute style, but I'm hoping for a better solution. Thanks

    Read the article

  • Geting SelectList to MVC view using AJAX/jQuery

    - by Chris
    Hi all. I have a C# MVC application which is populating a dropdown based on a date selected. Once the date is selected I am sending it to an action via AJAX/jQuery. The action gets a list of items to return for that date. Here is where my problem is. I have done it previously where I render a partial view from the action and pass it the SelectList as the model. However, I really just want to do it inline in the original view, so I'm hoping there is some way I can return the SelectList and from there do some magic Javascript/JQuery to put it into a dropdown. Has anybody ever done this before? If so, what do I on the client end after calling the load() to return the SelectList? I've done something like this previously, when I was just returning a string or other value to be rendered as straight text: $("#returnTripRow").load("/Trip.aspx/GetTripsForGivenDate?date=" + escape(selection)); But I'm not sure how to intercept the data and morph it into am Html.DropDown() call, or equivalent. Any ideas? Thanks, Chris

    Read the article

  • Ajax UpdatePanels scroll on partial page update.

    - by George
    I set the AutoPostback property of a textbox to True so I can process the TextChanged event on the server and, based on what they typed in the textbox, appropriately display a message in an update panel. The problem is, when the partial screen refresh is performed, no control on the screen has focus. 99% of the time, when the text in the textbox is changed, it is because the user has tabbed forward, and so, to limit the disruption in the lost of focus, I perform a "Focus" call on teh next control in the tab sequence. For the most part, this works OK, but of course, is disputive if the user is tabbing in the reverse order or has used the mouse to set the focus to another control. In these situations, the focus would be set to the next control even though the user was trying to set focus elsewhere. OK, that sucks. Now what I consider the bigger problem with calling the focus method on the server: In IE, it works OK, but in Mozilla Firefox and Chrome, setting the focus causes a repositioning of the scroll bar, even though none is necessary because the control is already in view. I realize that I could switch to doing AJAX web service calls, but these darn Updae Panels are so convenient if used in moderation. is there anyway to use updatepanels and not have these focus/scroll issues?

    Read the article

  • Browser freeze while ajax call in action

    - by kaivalya
    I have a ASP.NET Web App. I notice that while a simple ajax call(see below) is in process, web application does not respond to any action that I try on a different browser. $.ajax({ type: "GET", async: true, url: "someurl", dataType: "text", cache: false, success: function(msg){ CheckResponse(msg); } }); This happens when I open two firefox or two IE. I run the function that does the ajax call on first browser and till the response of the ajax is returned, I cannot do anything on the second browser on the same site. No breakpoints are hit on the server from the second browser till initial ajax is completed. It hangs for any click etc.. The hang on the second browser ends immediately after the ajax call is completed on the first one. This behavior is not observed if I try the same on IE and Firefox side by side. Only happen with IE & IE or FF & FF side by side Appreciate if you can help me see what I am missing here.

    Read the article

  • Using the Microsoft Ajax Minifier with Web Setup project & Source Control

    - by Rob
    I've just started investigating the Microsoft Ajax Minifer 4.0 for use with a Visual Studio 2008 Web Application I work on. It's proven easy enough to hook it into the .csproj file so it produced .min.js files for all scripts, however I'm stumped as to how to integrate this with the Web Setup project & Source Control. Essentially what I want to do is have the resultant .min.js files included in the Web Setup project without having them included in Source Control because: Having to check them out prior to the build being executing is a pain (the minifier cannot modify them if they're not checked out). As they're created as a "build artifact" it just seems wrong to have them stored under source control. The only option I've managed to come across so far is to explicitly include the .min.js files as part of the Setup project by right clicking on the Web Setup project and choosing "Add File", and then having the relevant folder hierarchy duplicated in "File System on Target Machine" so that I can force the file to the correct location. This is neither elegant or simple/robust as: It requires me to manually add every minified js file to the Web Setup project by hand Maintain a copy of the relevant directory structure in both the Web Application project and the Web Setup project Remember to add any new js files minified versions to the Web Setup project Is there a better way of doing this?

    Read the article

  • Ajax UpdatePanels SetFocus issue

    - by George
    I set the AutoPostback property of a textbox to True so I can process the TextChanged event on the server and, based on what they typed in the textbox, appropriately display a message in an update panel. The problem is, when the partial screen refresh is performed, no control on the screen has focus. 99% of the time, when the text in the textbox is changed, it is because the user has tabbed forward, and so, to limit the disruption in the lost of focus, I perform a "Focus" call on teh next control in the tab sequence. For the most part, this works OK, but of course, is disputive if the user is tabbing in the reverse order or has used the mouse to set the focus to another control. In these situations, the focus would be set to the next control even though the user was trying to set focus elsewhere. OK, that sucks. Now what I consider the bigger problem with calling the focus method on the server: In IE, it works OK, but in Mozilla Firefox and Chrome, setting the focus causes a repositioning of the scroll bar, even though none is necessary because the control is already in view. I realize that I could switch to doing AJAX web service calls, but these darn Updae Panels are so convenient if used in moderation. is there anyway to use updatepanels and not have these focus/scroll issues?

    Read the article

  • HTML Submit button vs AJAX based Post (ASP.NET MVC)

    - by Graham
    I'm after some design advice. I'm working on an application with a fellow developer. I'm from the Webforms world and he's done a lot with jQuery and AJAX stuff. We're collaborating on a new ASP.MVC 1.0 app. He's done some pretty amazing stuff that I'm just getting my head around, and used some 3rd party tools etc. for datagrids etc. but... He rarely uses Submit buttons whereas I use them most of the time. He uses a button but then attaches Javascript to it that calls an MVC action which returns a JSON object. He then parses the object to update the datagrid. I'm not sure how he deals with server-side validation - I think he adds a message property to the JSON object. A sample scenario would be to "Save" a new record that then gets added to the gridview. The user doesn't see a postback as such, so he uses jQuery to disable the UI whilst the controller action is running. TBH, it looks pretty cool. However, the way I'd do it would be to use a Submit button to postback, let the ModelBinder populate a typed model class, parse that in my controller Action method, update the model (and apply any validation against the model), update it with the new record, then send it back to be rendered by the View. Unlike him, I don't return a JSON object, I let the View (and datagrid) bind to the new model data. Both solutions "work" but we're obviously taking the application down different paths so one of us has to re-work our code... and we don't mind whose has to be done. What I'd prefer though is that we adopt the "industry-standard" way of doing this. I'm unsure as to whether my WebForms background is influencing the fact that his way just "doesn't feel right", in that a "submit" is meant to submit data to the server. Any advice at all please - many thanks.

    Read the article

  • integrating jquery with AJAX using MVC for ddl/html.dropdownlist

    - by needhelp
    the situation: a user on the page in question selects a category from a dropdown which then dynamically populates all the users of that category in a second dropdown beside it. all the data is being retrieved using LinqtoSQL and i was wondering if this can be done a) using html.dropdownlist in a strongly typed view? b) using jquery to trigger the ajax request on selected index change instead of a 'populate' button trigger? sorry i dont have code as what i was trying really wasnt working at all. I am having trouble with how to do it conceptually and programatically! will appreciate any links to examples etc greatly! thanks in advance! EDIT: this is kind of what i was trying to achieve.. first the ViewPage: <script type="text/javascript"> $(document).ready function TypeSearch() { $.getJSON("/Home/Type", null, function(data) { //dont know what to do here }); } </script> <p> <label for="userType">userType:</label> <%= Html.DropDownList("userType") %> <%= Html.ValidationMessage("userType", "*") %> <input type="submit" runat="server" onclick="TypeSearch()" /> <label for="accountNumber">accountNumber:</label> <%= Html.DropDownList("accountNumber") %> <%= Html.ValidationMessage("accountNumber", "*") %> </p> Then home controller action: public ActionResult Type() { string accountType = dropdownvalue; List<Account> accounts = userRep.GetAccountsByType(accountType).ToList(); return Json(accounts); }

    Read the article

  • Do I lose anything by coding in c# and using free online vb.net code convertors?

    - by Gullu
    The company I work for uses vb.net since there are many programmers who moved up from vb6 to vb.net. Basically more vb.net resources in the company for support/maintenance vs c#. I am a c# coder and was wondering if I could just continue coding in c# and just use the many online free c# to vb.net code convertors. That way, I will be more productive and also be more marketable since there are more c# jobs compared to vb.net jobs. I have done vb6 many years ago and I am comfortable debugging vb.net code. It's just the primary coding language. I am more comfortable in c#. Will I lose anything if I use this approach. (code conversion). Based on what i read online the future of vb.net is really "Dim". Please advise. thank you

    Read the article

  • Microsoft’s Contribution to jQuery – Client Templating

    - by joelvarty
    I am interested to see the community’s response to Microsoft’s contributions to jQuery.  I have been using jTemplates on and off in my apps for a while, but I will certainly check out the new templating plugins put forth by MS and explained here by Scott Guthrie. It may be that some are against the very idea of a company like Microsoft being involved with jQuery, and Scott explains the process with the following: “jQuery has a fantastic developer community, and a very open way to propose suggestions and make contributions.  Microsoft is following the same process to contribute to jQuery as any other member of the community.” I think we can take this in one of two ways:  It’s great that Microsoft sees themselves as a part of a greater community that they can support. It’s the first step in Microsoft’s attempt to usurp the community and have greater control over the web, it’s standards, and it’s developer community. Personally, I believe Microsoft sees the world (and the web) differently from how they did back when IE had more than %80 of the browser market.  Now, in order to keep it’s development products relevant, they are pushing Asp.Net (as they have been for a few years) towards a more open strategy that’s more “web-like” in my opinion. These contributions to jQuery are a good thing, I think.  Now, let’s go try out these new plug-ins and see if they stack up… more later - joel

    Read the article

  • Pro ASP.NET MVC Framework Review

    - by Ben Griswold
    Early in my career, when I wanted to learn a new technology, I’d sit in the bookstore aisle and I’d work my way through each of the available books on the given subject.  Put in enough time in a bookstore and you can learn just about anything. I used to really enjoy my time in the bookstore – but times have certainly changed.  Whereas books used to be the only place I could find solutions to my problems, now they may be the very last place I look.  I have been working with the ASP.NET MVC Framework for more than a year.  I have a few projects and a couple of major deployments under my belt and I was able to get up to speed with the framework without reading a single book*.  With so many resources at our fingertips (podcasts, screencasts, blogs, stackoverflow, open source projects, www.asp.net, you name it) why bother with a book? Well, I flipped through Steven Sanderson’s Pro ASP.NET MVC Framework a few months ago. And since it is prominently displayed in my co-worker’s office, I tend to pick it up as a reference from time to time.  Last week, I’m not sure why, I decided to read it cover to cover.  Man, did I eat this book up.  Granted, a lot of what I read was review, but it was only review because I had already learned lessons by piecing the puzzle together for myself via various sources. If I were starting with ASP.NET MVC (or ASP.NET Web Deployment in general) today, the first thing I would do is buy Steven Sanderson’s Pro ASP.NET MVC Framework and read it cover to cover. Steven Sanderson did such a great job with this book! As much as I appreciated the in-depth model, view, and controller talk, I was completely impressed with all the extra bits which were included.  There a was nice overview of BDD, view engine comparisons, a chapter dedicated to security and vulnerabilities, IoC, TDD and Mocking (of course), IIS deployment options and a nice overview of what the .NET platform and C# offers.  Heck, Sanderson even include bits about webforms! The book is fantastic and I highly recommend it – even if you think you’ve already got your head around ASP.NET MVC.  By the way, procrastinators may be in luck.  ASP.NET MVC V2 Framework can be pre-ordered.  You might want to jump right into the second edition and find out what Sanderson has to say about MVC 2. * Actually, I did read through the free bits of Professional ASP.NET MVC 1.0.  But it was just a chapter – albeit a really long chapter.

    Read the article

  • Active Server Pages error 'ASP 0126' classic asp pls help

    - by sagarmatha
    our company have a a old classic asp application, we have no choice but to host it. I just moved it to another server. It was perfectly running fine in old server but in this new server it's continuously giving this error. I am running windows 2003 server with IIS 6. Why I am geting this error ? please help. Active Server Pages error 'ASP 0126' Include file not found /application/unprocessed_application.asp, line 56 The include file '../../_fplclass/pdblib.inc' was not found.

    Read the article

  • Shallow Copy vs DeepCopy in C#.NET

    Hope below example helps to understand the difference. Please drop a comment if any doubts. using System; using System.IO; using System.Runtime.Serialization.Formatters.Binary; namespace ShallowCopyVsDeepCopy {     class Program     {         static void Main(string[] args)         {             var e1 = new Emp { EmpNo = 10, EmpName = "Smith", Department = new Dep { DeptNo = 100, DeptName = "Finance" } };             var e2 = e1.ShallowClone();             e1.Department.DeptName = "Accounts";             Console.WriteLine(e2.Department.DeptName);             var e3 = new Emp { EmpNo = 10, EmpName = "Smith", Department = new Dep { DeptNo = 100, DeptName = "Finance" } };             var e4 = e3.DeepClone();             e3.Department.DeptName = "Accounts";             Console.WriteLine(e4.Department.DeptName);         }     }     [Serializable]     class Dep     {         public int DeptNo { get; set; }         public String DeptName { get; set; }     }     [Serializable]     class Emp     {         public int EmpNo { get; set; }         public String EmpName { get; set; }         public Dep Department { get; set; }         public Emp ShallowClone()         {             return (Emp)this.MemberwiseClone();         }         public Emp DeepClone()         {             MemoryStream ms = new MemoryStream();             BinaryFormatter bf = new BinaryFormatter();             bf.Serialize(ms, this);             ms.Seek(0, SeekOrigin.Begin);             object copy = bf.Deserialize(ms);             ms.Close();             return copy as Emp;         }     } } span.fullpost {display:none;}

    Read the article

  • How should data be passed between client-side Javascript and C# code behind an ASP.NET app?

    - by ctck
    I'm looking for the most efficient / standard way of passing data between client-side Javascript code and C# code behind an ASP.NET application. I've been using the following methods to achieve this but they all feel a bit of a fudge. To pass data from Javascript to the C# code is by setting hidden ASP variables and triggering a postback: <asp:HiddenField ID="RandomList" runat="server" /> function SetDataField(data) { document.getElementById('<%=RandomList.ClientID%>').value = data; } Then in the C# code I collect the list: protected void GetData(object sender, EventArgs e) { var _list = RandomList.value; } Going back the other way I often use either ScriptManager to register a function and pass it data during Page_Load: ScriptManager.RegisterStartupScript(this.GetType(), "Set","get("Test();",true); or I add attributes to controls before a post back or during the initialization or pre-rendering stages: Btn.Attributes.Add("onclick", "DisplayMessage("Hello");"); These methods have served me well and do the job, but they just dont feel complete. Is there a more standard way of passing data between client side Javascript and C# backend code? Ive seen some posts like this one that describe HtmlElement class; is this something I should look into?

    Read the article

  • Embarking on a website redevelopment and all developers pushing to move to ASP.NET 4.0

    - by Sue
    Our company is going through a website redevelopment / retooling exercise and we are not quite sure which direction to take. We are told that the website was built in ASP classic and that we should be moving to ASP.NET 4.0. Some developers refuse to do any work in the ASP classic framework citing the advantages of ASP.NET 4.0-- stability, compilation, language support. We are generally happy with our website as is. There are some kinks in the backend involving forms and there is little integration between the CRM of the website and any content management system. Does the move from ASP classic to ASP.NET 4.0 give major advantages to the integration between how content is created, and delivered to our customers?

    Read the article

  • IL and case-sensitivity

    - by Ali .NET
    Quoted from A Brief Introduction To IL code, CLR, CTS, CLS and JIT In .NET CLS stands for Common Language Specifications. It is a subset of CTS. CLS is a set of rules or guidelines which if followed ensures that code written in one .NET language can be used by another .NET language. For example one rule is that we cannot have member functions with same name with case difference only i.e we should not have add() and Add(). This may work in C# because it is case-sensitive but if try to use that C# code in VB.NET, it is not possible because VB.NET is not case-sensitive. Based on above text I want to confirm two points here: Does the case-sensitivity of IL is a condition for member functions only, and not for member properties? Is it true that C# wouldn't be inter-operable with VB.NET if it didn't take care of the case sensitivity?

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >