asp.net-ajax

how to upload multiple image in asp.net mvc using ajax

北城以北 提交于 2019-12-24 22:15:59
问题 I am trying to upload multiple images using ASP.NET MVC and Ajax. Was able to get the code to work and upload 1 image but finding it difficult to upload multiple images in a separate image folder. Appreciate any help. please find the HTML code <div class="row" style="margin-top:20px;"> <div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-4" style="margin:0 !important;"><label style="margin-top:5px; margin-left: -15px;">Select image</label></div> <div class="col-md-8" style="margin:0

Why is javascript unable to get asp:Label innerText?

最后都变了- 提交于 2019-12-24 20:44:35
问题 I have two labels: username and email. I use them to retrieve their content and pass them as method parameters. var lblEmail = $get('<%= lblEmail.ClientID %>'); var email = lblEmail.innerText; var lblUsername = '<%= lblUsername.ClientID %>'; var username = lblUsername.innerText; The email label is defined in the same way as username label does, but for this last I can't get the value, innertext returns undefined. ... <td class="inputField"> <table cellpadding="0" cellspacing="0" border="0">

ASP.Net Listview & AJAX Update Panel

我的未来我决定 提交于 2019-12-24 20:34:23
问题 I have to create a listview which contains thumbnails of few items, and when we click on the more button it should display rest of the items in the same listview,. how do i achive this, i dont want to do a postback and i would like to do this with ASP.Net Listview and AJAX Update Panel, i went through the web and seems ppl are finding difficulties in this, do you have any suggestions or tips in doing this, any help is much appreciated. 回答1: Should be fairly simple. Use a Take() for your

ASP.NET AJAX: How can I send information to the client from server-side

我们两清 提交于 2019-12-24 18:31:33
问题 The page has already run its' initialise/load sequences etc but then catches an event. How can I then send value(s) from this event to the client. That probably doesn't make much sense, hopefully this will clarify: I have a grid (Telerik RadGrid) in a user control (A) and when the user selects a row in that grid, I want to update another user control (B) with the selection. I have wired up an event so that user control B is notified of the newly selected value however setting say a textbox

Arraylist and webmethod

馋奶兔 提交于 2019-12-24 15:42:36
问题 I have written a web method in ASP.net which it's output is an ArrayList of cities that is read from Sql server database. this webmethod is called using Jquery in clientside. but I don't know how to read each item of array list using jquery. for example every city and it's id equivalent. Below is my Webmethod: public ArrayList showcity(int s) { ArrayList list = new ArrayList(); String strConnString = ConfigurationManager .ConnectionStrings["ConnectionCS"].ConnectionString; String strQuery =

Make a Session never timeout OR redirect user to home page. ASP.NET

别说谁变了你拦得住时间么 提交于 2019-12-24 15:22:49
问题 I am working on a asp.net 3.5 web application the session time-out is set to 24 hours but a recycling of ASPNet process on the server is scheduled to trigger everyday at 3:00 A.M. is causing the session to timed out. What is the best solution and how to achieve it : My code should constantly listen to the server and show a message to user and redirect him to home page after session is expired? OR A solution which makes a session to never timeout. Thanks in advance BB 回答1: Please refer this

Ajax.BeginForm(…) not always working, full postback sometimes, using ASP.NET MVC

半世苍凉 提交于 2019-12-24 11:16:06
问题 I cannot for the life of me figure out why this postback sometimes does an ajax one as it is supposed to and sometimes it does not. Here is the relevant code: JS: <html> <head> <title>Index</title> <link href="/Content/screen.css" rel="stylesheet" type="text/css" /> <!--[if lt IE 8]><link href="/Content/ie.css" rel="stylesheet" type="text/css" /><![endif]--> <link href="/Content/plugins/fancy-type/screen.css" rel="stylesheet" type="text/css" /> <link href="/Content/plugins/buttons/screen.css"

Ajax.Pager not working in MVC4

浪子不回头ぞ 提交于 2019-12-24 10:47:55
问题 I was using Ajax.Pager in MVC 2 which worked fine.Here is the code in the view <%= Ajax.Pager(new AjaxOptions { UpdateTargetId = ViewData.Model.UpdateTargetId, OnBegin = "beginPagings", OnSuccess = "successPagings", OnFailure = "failurePaging" }, ViewData.Model.PageSize, ViewData.Model.PageNumber, ViewData.Model.TotalItemCount, new { controller = ViewContext.Controller.ControllerContext.RouteData.Values["Controller"], action = ViewContext.Controller.ControllerContext.RouteData.Values["action"

ASP CompositeControl & ScriptManager

房东的猫 提交于 2019-12-24 10:36:26
问题 I'm really new to the WebControl / CompositeControl world, and I have a small test class I am playing with. It's just a LinkButton that updates when clicked. Things work great when I leave it out of UpdatePanel . But when I try to run it inside I still get a full page POST response. How can I make this class work inside a UpdatePanel ? Here's the class: public class Test2 : CompositeControl { private static readonly object testButtonEvent = new object(); public event EventHandler OnTestClick

ASP.NET Ajax - Autocompleteextender control appears behind other controls

萝らか妹 提交于 2019-12-24 10:15:09
问题 To be specific I have a search form with an autocompleteextender at the top. When you type in a string, it autocompletes with matches in a drop down as expected. The problem is that a couple of SliderExtender controls further down the form are appearing above the autocomplete dropdown (it is not covering these controls). I've looked around but can't find an answer yet. It seems that the problem can occur with other controls and not specific to these. 回答1: I found a simple answer which works