asp.net-ajax

ASP.NET webforms + ASP.NET Ajax versus ASP.NET MVC and Ajax framework freedom

北城以北 提交于 2019-11-28 16:53:39
If given the choice, which path would you take? ASP.NET Webforms + ASP.NET AJAX or ASP.NET MVC + JavaScript Framework of your Choice Are there any limitations that ASP.NET Webforms / ASP.NET AJAX has vis-a-vis MVC? I've done both lately, I would take MVC nine times out of ten. I really dislike the implementation of the asp.net ajax controls, I've run into a lot of issues with timing, events, and debugging postback issues. I learned a lot from http://encosia.com/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/ The asp.net project we used the MVP pattern http://www.codeplex.com/aspnetmvp ,

How to call function on timer ASP.NET MVC

流过昼夜 提交于 2019-11-28 15:40:42
I need to call function on timer (lets say onTickTack() function) and reload some info in ASP.NET MVC project. I know that there are several ways to do that, but which one is the best by your opinion? Note: the function should be called from one place only, and should be called every X mins till application is up. EDIT 1: Reload some info - for example I have something in the Cache and I want to update it from DB on timer - once a day in certain time. The answer to this question would very much depend on what do you mean by reload some info in ASP.NET MVC project . This is not a clearly stated

Prevent ASP.net __doPostback() from jQuery submit() within UpdatePanel

只愿长相守 提交于 2019-11-28 13:42:32
I'm trying to stop postback on form submit if my custom jQuery validation returns false. Is there any way to prevent the __doPostback() function finishing from within the submit() function? I'd assumed: $('#aspnetForm').submit(function () { return false; }); would do the trick, but apparently that's not the case: does anyone have a suggestion? The submit() function does block the postback (it won't postback if you pause at a breakpoint in firebug), but I can't seem to stop the event happening after the submit() function is complete! Cheers, Ed EDIT OK, I had a quick mess about and discovered

Why PartialView cannot reload with Ajax in MVC

断了今生、忘了曾经 提交于 2019-11-28 13:10:53
I use a popup window to create a new record and I render a view inside the window. In addition to this, I call a partialview in this view according to the selectedindex of a combobox in it. I can successfully post the form to the Controller and return it to the view when there is an error. However, after returning the form, only the view part returns and I cannot render the partialview . So, how can I also render partialview as the last status just before submitting the form? View: <script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script> <div id="target"> @using (Ajax.BeginForm("

Where is this “Too Many Characters in String literal” message coming from?

我们两清 提交于 2019-11-28 11:46:33
问题 Good morning all, I'm sure this is a gimme, but I have no idea where this issue is coming from. I have the following lines in a view: <fieldset> <dl> <dt> <label for="FormTypes">Form Type:</label> </dt> <dd> <% =Html.DropDownList("FormTypes", "All") %> </dd> </dl> </fieldset> <fieldset> <dl> <dt> <label for="Parts">Form Part:</label> </dt> <dd> <% =Html.DropDownList("Parts", "All") %> </dd> </dl> </fieldset> This causes no problems, but when adding the following script to the top of to update

How to Install NeatUpload?

女生的网名这么多〃 提交于 2019-11-28 11:40:20
Salvete! Whilst searching for a quality, free asp.net/ajax upload control, I found NeatUpload. I cannot find an online demo for it, but the download package does come with a demo. I need some help installing it on my server (Windows Server 2008). I followed the directions at http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html (they are basically the same as the directions in the manual.htm that comes with the NeatUpload binary package). So far, I have Successfully installed Brettle.Web.NeatUpload.dll to the GAC using gacutil. Added the reference in my web.config

calling a public function of an asp.net ajax server control from client side

旧城冷巷雨未停 提交于 2019-11-28 11:38:43
问题 I want to make a ajax server control in ASP.NET and in that application I have a textbox and I want to send text of that textbox to function that is created in ASP.NET ajax server control class and that function return some result based on text. My Application uses Server controls which are Imported from External DLL added as a reference. This Server Control will make use of AJAX to complete its functionality. To use My control, I would add the Script Manager and My Control on the .aspx page

Does Session timeout reset on every request

情到浓时终转凉″ 提交于 2019-11-28 10:51:09
Does Session timeout reset on every request regardless of whether we check sessions variables? Or we should use atleast one session variables? Does Ajax request cause resetting session timeout? like Update Panel , jQuery ajax ,... thanks Edit 1) Does HTTP Get cause resetting session timeout?? yes, it does. it doesn't matter whether you actually use the Session or not. However, if you're using only ajax calls, you might run into some problems. (although I haven't encountered it myself, here 's an explanation) Does Session timeout reset on every request regardless of whether we check sessions

RegisterClientScriptBlock within AJAX method call

有些话、适合烂在心里 提交于 2019-11-28 08:37:58
I am trying to RegisterClientScriptBlock in a method that is only called via an AJAX call. It doesn't appear to actually register the script on the page and I'm guessing this is because it's not actually reloading the entire page. Is there any way to register javascript on a page from within an ajax method call? protected void MyMethod(object sender, EventArgs e) { // This method only called via AJAX call Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "resize", "alert('here');", true); } With AJAX enabled pages, you should use the ScriptManager to register scripts: ScriptManager

Asp.NET MVC AjaxOptions OnSuccess fires.. too early?

戏子无情 提交于 2019-11-28 08:33:12
I'd like to use the OnSuccess option of AjaxOptions passed as Ajax.BeginForm argument to "do something" once the response is completely received and DOM updated. As far as I can undestand from MSDN, this is what this option do. In my application, OnSuccess script fires too early, immediately after the request is sent. I put to sleep the thread for a while, to better see the result. I supposed to see the OnSuccess script (an alert) fired after that sleep time, say, 2 seconds. I use Firebug to see what's happening under the hood, and all I see is: I click the button (submit inside the ajax form)