asp.net-ajax

UpdatePanel Gridview not updating

流过昼夜 提交于 2019-12-01 07:33:43
For some reason, I can't get the Gridview in the Updatepanel to refresh after I've made changes. can someone help? I'm using the ToolkitScriptManager control and the UpdatePanel. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView blah... </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="DeleteButton" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="IBUpUp" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="IBDownDown" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="IBUp"

UpdatePanel Gridview not updating

蓝咒 提交于 2019-12-01 05:12:35
问题 For some reason, I can't get the Gridview in the Updatepanel to refresh after I've made changes. can someone help? I'm using the ToolkitScriptManager control and the UpdatePanel. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView blah... </asp:GridView> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="DeleteButton" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="IBUpUp" EventName="Click" /> <asp

How can I programmatically add triggers to an ASP.NET UpdatePanel?

大城市里の小女人 提交于 2019-12-01 05:09:42
问题 I am trying to write a quote generator. For each product, there are a set of options. I want to dynamically add a drop down list for each option, and then have their SelectedIndexChanged events all wired up to update the quote cost. I am not having any trouble adding the DropDownList controls to my UpdatePanel, but I can't seem to wire up the events. After the page loads, the drop downs are there, with their data, but changing them does not call the SelectedIndexChanged event handler, nor

Ajax Redirect to Page instead of Updating Target

≡放荡痞女 提交于 2019-12-01 04:35:09
I am using a partial view for login and would like to redirect the user to a new page on success and show the validation errors in the partial view if the model is invalid. The ajax target is being updated and success or failure. If the the model is valid, it is showing the entire new page in the update target but I want it to redirect to the new page. I have tried Redirect and RedirecttoAction but it is not getting the desire results. Any ideas on what I can to go get an ajax update to redirect to a new page, not update the target. Also, let me know if I am using the wrong approach. Partial

ASP.NET MVC : AJAX ActionLink- Target an HTML attribute

风流意气都作罢 提交于 2019-12-01 04:01:24
问题 I have an Ajax actionlink that requests a string in the controller method. I want to insert that string into an attribute of a hyperlink. HOw do I specify the attribute field of the target id element? <img id="CHANGE-MY-SRC" src=ViewData["src"] > <%=Ajax.ActionLink("Change IMG Source","actionChange",new AjaxOptions() UpdateTargetId="CHANGE-MY-SRC"})%> public string actionChange() { ViewData["src"]= "somethingNew"; return ???????? } 回答1: The default behavior for the Ajax helpers won't support

TinyMCE with AJAX (Update Panel) never has a value

大憨熊 提交于 2019-12-01 03:22:47
I wanted to use a Rich Text Editor for a text area inside an update panel. I found this post: http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors via this question: Need ASP.Net/MVC Rich Text Editor Decided to go with TinyMCE as I used it before in non AJAX situations, and it says in that list it is AJAX compatible. Alright I do the good ol' tinyMCE.init({ //settings here }); Test it out and it disappears after doing a update panel update. I figure out from a question on here that it should be in the page_load function so it gets run even on async postbacks.

Assign a Javascript function to AjaxOptions OnSuccess property raise an error - ASP.NET MVC

匆匆过客 提交于 2019-12-01 03:17:13
I'm using the Ajax.ActionLink helper to generate a link to delete a record. This is the code: Ajax.ActionLink("Delete Image", "DeleteImage", new { id = item.Id }, new AjaxOptions { HttpMethod = "Delete", OnSuccess = "Test()" } ) I'm assign a Javascript function (Test()) to the OnSucess property because I want to do some JQuery stuff, but when I click the Delete link this error message is raised Microsoft JScript runtime error: 'b' is null or not an object in the MicrosoftAjax.js file (Line 5, Column 62099). If I remove the OnSuccess property, everything works fine (even if the Test() function

When Is ScriptManager/ScriptManagerProxy Required?

妖精的绣舞 提交于 2019-12-01 02:43:39
问题 I don't think I've been able to find a definitive answer on this, so I'll ask it here. When is a ScriptManager (or ScriptManagerProxy in the case of using a ScriptManager on a Master Page) needed? For example, let's say that I have a ScriptManager on a MasterPage: If I have a Web Content Form that contains an UpdatePanel, does it need a ScriptManagerProxy? If I have a Web Content Form that contains a User Control and that User Control has an UpdatePanel in it, does the User Control need a

Ajax Redirect to Page instead of Updating Target

旧巷老猫 提交于 2019-12-01 02:35:21
问题 I am using a partial view for login and would like to redirect the user to a new page on success and show the validation errors in the partial view if the model is invalid. The ajax target is being updated and success or failure. If the the model is valid, it is showing the entire new page in the update target but I want it to redirect to the new page. I have tried Redirect and RedirecttoAction but it is not getting the desire results. Any ideas on what I can to go get an ajax update to

Is it good to use jQuery AJAX with traditional true?

点点圈 提交于 2019-12-01 02:24:16
First, I don't know what traditional means in Ajax setting, Second, is there any case we need set it to be true in ASP MVC? Based on the name, I believe it's going to be depreciated soon? Isn't it? jQuery API documentation http://api.jquery.com/jQuery.Ajax/#jQuery-ajax-settings traditional Type: Boolean Set this to true if you wish to use the traditional style of param serialization . Let's have a look below, tranditional flag changes the way how parameters are sent to the server For PHP developer $.ajax(url, { data : { a : [1,2,3] }, traditional : false })); // `data` are sent as "a[]=1&a[]=2