asp.net-ajax

ASP.net PageMethods return undefined

旧街凉风 提交于 2019-12-02 06:08:45
Hi everyone i trying to get data from cs to js using ToolkitScriptManager. this is my aspx : <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script src="../assets/lib/jquery/jquery-2.0.3.js" type="text/javascript"></script> <script> $(window).load(function () { alert(PageMethods.isConnected()); }); </script> </head> <body> <form id="form1" runat="server"> <asp:ToolkitScriptManager runat="Server" EnablePageMethods="true" EnablePartialRendering="true" /> <div> </div> </form> </body> </html> and this is my code behind [ScriptMethod, WebMethod] public static bool

asp.net mvc save checkbox value to database

僤鯓⒐⒋嵵緔 提交于 2019-12-02 05:49:57
问题 I have a simple mvc project consisting of one table named Persons and that table has some attributes like name, age, surname and so on. I Recently added an attribute to table which is type of bit in SQL and bool in C# and for me it represents some status. If it is ok I put that status to true or false. In one controller I create an index view of my Persons in the database and I display the status as a checkbox. That is working ok. What I want to do is to change the status if I click on that

Accordian ajax control gives JScript runtime error

感情迁移 提交于 2019-12-02 04:50:50
问题 I'm using Accordian control of ajax toolkit. I'm getting the following error: Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element 回答1: I just ran into this problem as a result of having commented out a block of old HTML ( <!-- ... --> ) which contained textboxes and maskededitextenders. When I removed that HTML the error stopped occurring. 回答2: There could be a whole host of problems associated with this error. Not

How can I get my Autocomplete extender to work?

↘锁芯ラ 提交于 2019-12-02 04:33:37
问题 I've tried to the letter to search for mistakes in my code, but i can't myself get that autocomplete extender to work. Help wanted. Here's my code: (excerpt from my aspx page) <asp:TextBox ID="TextBox1" Width="120px" runat="server"></asp:TextBox> <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" ServiceMethod="GetCompletionList" ServicePath="SearchAutoComplete.asmx" MinimumPrefixLength="1"> </cc1:AutoCompleteExtender> My Webservice code: [WebMethod

ASP timer Control is refreshing the whole page?

你说的曾经没有我的故事 提交于 2019-12-02 03:58:53
I have a ASP timer control which is supposed to run every three minutes. Although I kept the Timer control in an update panel, it is refreshing the whole page every time it runs. Is there any it only refresh the particular section of the page, not the whole page? <div> <asp:UpdatePanel ID="UpdatePanel4" runat="server"> <ContentTemplate> <asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="300000" > </asp:Timer> </ContentTemplate> </asp:UpdatePanel> </div> <asp:Timer runat="server" id="UpdateTimer" interval="200" ontick="function" /> <asp:UpdatePanel runat="server" id=

Ajax.BeginForm refreshing the whole page in MVC

落爺英雄遲暮 提交于 2019-12-02 03:07:51
I've been trying to add some Ajax functionality to my mvc site, however, I run into a problem regarding page refreshing. I've created an rss view on my homepage sidebar, which allows the user to select which rss feed they want to view using a drop down list. Initially I was using the html.begin form option in mvc, however, I decided it would be a cool feature to have the rss feeder refresh, rather than having the whole page refresh. I implemented the ajax.begin form, but the whole page is still refreshing. Here is the code inside my view: <div class="rss_feed"> <h3>RSS Feed</h3> @using (Ajax

Horizontal and Vertical Accordion

大憨熊 提交于 2019-12-02 02:35:39
I want to create a horizontal and vertical accordion in asp.net. I have use Ajax Toolkit Accordion but cannot change its orientation: ------- ------- ------- created using ajax toolkit ------- ||||| ||||| looking for this ||||| ||||| Raymond Fraikin Here is an working example for ASP.NET (C#) (USER CONTROL) <head> <title></title> <link href="/UserControls/Accordion/Css/Accordion.css" rel="Stylesheet" type="text/css" media="all" /> </head> <asp:Table ID="AccordionTable" runat="server" CellPadding="0" CellSpacing="0" Width="100%"> <asp:TableRow Width="100%" Height="200px"> <%-- SLIDER 1 --%>

How can I get my Autocomplete extender to work?

荒凉一梦 提交于 2019-12-02 02:25:23
I've tried to the letter to search for mistakes in my code, but i can't myself get that autocomplete extender to work. Help wanted. Here's my code: (excerpt from my aspx page) <asp:TextBox ID="TextBox1" Width="120px" runat="server"></asp:TextBox> <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="TextBox1" ServiceMethod="GetCompletionList" ServicePath="SearchAutoComplete.asmx" MinimumPrefixLength="1"> </cc1:AutoCompleteExtender> My Webservice code: [WebMethod] public static string[] GetCompletionList(string prefixText, int count) { List<string> returnData =

How to get child controls correct id to client side

∥☆過路亽.° 提交于 2019-12-02 01:33:31
I am working on ASP.NET and not using any ASP.NET's AJAX framework. Now I am trying to update the contents of the textboxes and dropdowns in the Grid controls cell on client side using (classic JavaScript way)AJAX. But problem I am facing is that controls (textbox, dropdown) which I would like to update when rendered on the client side get prefixed by the User Controls id and row ids. So it becomes like UserContro_row_no_controlId . With this it is becoming difficult to keep track of controls ids on the client side to update them. Please let me know how this can be simplified? Can we get what

Button inside Update Panel is not triggered, in asp.net

大兔子大兔子 提交于 2019-12-02 00:32:51
问题 <asp:ModalPopupExtender ID="MPE_EditGroup" runat="server" TargetControlID="btnShowPopup" PopupControlID="pnlpopup" CancelControlID="btnCancel" /> <asp:ToolkitScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false"> <ContentTemplate> <asp:Panel ID="pnlpopup" runat="server"> <asp:ListBox ID="lst_allmembers" DataValueField="FirstName" runat="server" /> <asp:Button ID="btn_Add" runat="server" Text=