Jquery - Programming With Js In Client Side With Ajax Technology?
Nov 12, 2010
I'm want to build web site in asp.net(because I know this language) in server side, and js (probably jquery) in client side, with Ajax technology. I heard that ASP.NET AJAX is too slow, if it's true (is it?) - what are the other options (to combine ASP.NET and Ajax) for me? Which tool combine all that technologies?
but I am rather confused about what to invest in. I heard that server-side code translates into client-side code. So, if you have an .aspx file, it will be converted to HTML/CSS/JavaScript. I have experience with the latter three technologies put into a rather dull text file and rendered by a web browser. My question is how much HTML/CSS/Javascript coding would I have to do when server-side programming? In other words, can someone using ASP.NET program purely on the server side and not bother to write for the client side? Of course, I don't care about server-side being translated into client-side, but I am wondering if client-side programming needs to be done explicitly and to what degree.
This is not a programming question per se, but rather an attempt to find the adequate technology to use for my objective. My mandate is to build an ASP.NET Web Application. However, on certain pages, some client-side information needs to be fetched by interacting with hardware on the client's computer, for example a barcode reader or an RFID tag reader. My first reflex was to think "ActiveX" controls with, perhaps, some AJAX coding to fetch the required values from said control. However, I am not sure if I am up to date with the latest tech trends. The solution I'm looking for will let me design a user control that plugs into my ASP.NET Web Application, lets me interact with client-side hardware, and can be automatically downloaded from the Web Application itself (I can't predict which computers will access my Web Application). Which technology(ies) should I go for?
I have a web form which does a full page postback when a button is clicked. This is caused by an update panel trigger. Client-Side: When the button is clicked, an animation gif is displayed Server-Side: When the button is clicked, the server side event changes the content type to excel, binary writes out excel content (byte array) and does Response.Flush() and Response.End() Client-Side: User is asked to either open or download the excel file. Animation gif is still displayed.
Question: How can I detect client side (using jQuery or Ajax) that the response has been completed. There is no page postback because the code-behind has cut off the response by using Response.End().
I'm designing a page which makes an ajax call (via jQuery.ajax) to a page method on the server side.On the server side, I have two classes: Agent and Channel.
In the page method, I'd like to return a List<Agent> and a List<Channel> to the client side. How can I return two lists to client side? should wrap them up in one class like:
I've tried Populate ASP.Net DataList by binding DataSet Client Side using jQuery AJAX posted in [URL] .... while binding records in datalist using JQuery there is no problem, i want to bind image inside of the datalist. There is a field imgpath which stores image path. Now i want to bind the image which path is stored in the database using JQuery.
ASP.NET server controls has a few categories, for example, normal ones e.g. TextBox, Button which can be done in HTML/JS; Validation controls: can be done in JS; Login controls: I have seen them implemented in JS. Data bound controls: not sure, but maybe JS can work directly with databases, implementing controls like photo slider. So in the time span of next 5-10 years, will server-side web programming model fall out of mainstream and be replaced by JS/Ajax that interacts directly with databases?
Suppose I'm building a StackOverflow clone using webforms ASP.NET and jQuery. The Question page has a question, several answers, and comments under each. Requirements:Users can post new answers and comments, and edit existing ones, without postbacks. No UpdatePanels; the AJAX calls retrieve just the JSON they need, not HTML fragments. The page loads with all existing answers and comments in place (no javascript needs to run to read the page).
What I'm trying to figure out is how to do this without having to maintain two sets of markup (one that's bound on the client using some form of jQuery templating, and one that's bound on the server using traditional WebForms).
i have created a website in vs 2008. and i want to deploy that website on other system. i don't want to give all the source(just like .exe file not source).
I know that I can receive an javascript object from the server via ASP.NET AJAX using Json. But I am not sure how can I send an javascript object from my client-side javascript to my server-side code. And if I can, how can I extract this object in my server-side code and access its members?
I reordered some items in a listbox using Javascript. When I read the items in a postback in the code behind (ASP.NET), the order is in the original order. How do I get the same order as shown in the screen after Javascript manipulation?
I m using site login Control in my login.ascx file and disaplaying login control in Div so if there is login link in page and i click on that then Login Div will popup which is site login.May i know how can handle error like username or password is incorrect on client side instead server side?
in a form i have a buttoin, when click both OnclientClick and postback should happen. on clicking the "Email" button a client side "mailto" tag should do the work and pull a new message window on the client's machine.
whereas, the email addresses should be invoked by the post back. so , when clicking the button the server side post should happen and on return the client side script should be invokded with the values read during post back, and populate all the email addresses.
i need know how to first do a server hit take the values and then execute the client script with those values without using AJAX
I am calling server side methids from client side using PageMethods. Can those methods return value back to client side. If yes then how and if no then how can that be achieved? refer to my code below.
I am using VS2010 and .NET4 for a web app. I have a script manager/update panel that has a couple of grids.
The client just leaves the page opens and views an updated grid every 30 seconds or so.
I want to refresh the grid by calling the server side method to load the grid, but not load the whol page using meta refresh or similar (too much screen flicker and unnecessary bandwith).
Is it possible to set some timer using javascript or something and call a specific server method to refresh controls?
I want to do something a little bit tricky here. I want to call a server side fonction from the javascript. I know it can be done but I get some errors. This is my Javascript fonction where I want to call the server side fonction:
Anyone have any suggestions for 3rd party controls that work entirely client side?By this I mean the following using the example of an invoice:An invoice is a master, with children.I have to be able to select properties on the invoice and add lines to the invoice via a grid to obviously have the customer like my invoice editing window because they don't want to have to enter the basics and then save and then add the line items.In a classic asp.net/mvc.net model the server does the processing. This requires that you either store your data objects in the view state (in this case EF) or you store it in the session.Neither scales worth crap.What I'm looking to do is be able to create an entire form that interacts in javascript using jquery and never posts back to the server to be persistant. It may pull data from the server to update lists and do lookups etc. but it will never have to have the server hold information to be persistant while it's being built (and thus only when the user clicks save will it actually post the data back.In a perfect world what would happen is that the EF object would be converted to javascript and then used and bound, and updated. Once I'm done I'd post back the javascript object and it would be automatically converted to the EF equivalent class which I could then attach and save to the database.By doing this I can eliminate all persistant memory usage and indeed essentially ALL use of the Session or viewstate which would be super powerful.
I have a user control which contains a CustomValidator which is used according to whether a RadioButton is checked or not (there are several RadioButtons, I'm only showing the relevant one)
There is some client + server side validation code (the server side code does exactly the same thing and is skipped for brevity)
<script type="text/javascript"> function ValidateDateFields_Client(source, args) [code]...
There are two instances of this control in the page. When running the client side version it hits the wrong one (the version of the control which is disabled). You can see from the generated HTML both are correctly specified. I'm not sure how .NET works out which clientside function to call given they both have the same name.
[code]... Do i need to add something in to scope it? What's the best way to achieve this? If I disable the loading of the second control everything works fine.