.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

AJAX web form size

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net

We have developed an ASP.Net 3.5 application which includes a form for the user to fill in and submit to the server. The form contains some 40 controls or so (mostly textboxes, drop down listboxes, and some custom web controls) which are being validated (some using Custom Validators and server-side logic). To make the user experience feel like a connected session we have used AJAX (a ScriptManager and an Update Panel containing all page controls.)

Although the application is performing quite well when deployed onto a LAN environment, when published onto the web, the users experience long delays (some 20 seconds to refresh the page or to have validators check each control); for slow link users, this can take up to a minute or more.

After investigating the issue a bit, I discovered that if I save the page from the browser, it saves some 600K, most of which being some 13 ScriptResource.axd files and a couple WebResource.axd. I have no idea of what these are, but I suspect they are AJAX javascript libraries..

By removing the ScriptManager from the page, I get the page size to a more reasonable 90K size.


Can somebody please explain to me why this is happening? Is there a way to minimise my page size and still use AJAX?



View Complete Post

More Related Resource Links

Setting size of Grid Since Ajax Resizer Changed It


I'm sure that wasn't a very good subject, but I couldn't think of a better one. What I have is a page that has an UpdatePanel on it with a GridView control in it. It was originally displaying at a particular height and width according to the CSS style I have setup for it in my style sheet. However, since adding an AJAX Resizer control to the UpdatePanel, it is now defaulting to a much smaller size.

How do I get the grid to default to that same height and width that is in its CSS class? I don't mind putting it in the ASPX page or whatever, just need the grid to default to a larger size than the small little box it defaults to since adding the AJAX resizer. 

Using ajax to submit and update form


Hi all,

  I'm new to ajax and not sure if it's necessarily the technology I need to accompolish what I'm looking to do. What I'd like to have is a simple two textbox and button form that let's the user submit some credentials (not for logging in) but instead to verify their identity for other purposes.  I would label the button as "Continue" and assuming it passes through, the form would update with some new data entry controls that would allow them to submit some final information.  I thought perhaps ajax would be a nice way to do this since I wouldn't need to create a second continuation page from the first to display a new form.  However, I'm unsure how it's possible to update the form in the first place to look different.  Or is there perhaps a cleaner way to do this?  Any help would be appreciated.  Thanks

AJAX Form POST Request to a DLL Problem

I am using AJAX javascript for POSTING a complete HTML form to the server which is an external dll on a different server and displaying the response. The server-response is displayed in a "div" . basically i need to show a poll in a .aspx page which is basic a question with 3 options & a button. Now on click of submit button i need to post the data to a dll & show the result from the dll itself. Any idea how to do this? is it possible..any code???

AJAX, Data Form Web Part, and Paging

I've placed a Data Form Web Part into an Update Panel, and it works great.  This particular use of the web part requires Single Item mode with paging.  My problem is that the "Previous" button for paging calls a javascript function for "history.back()".  Well, the only history to go back to since I am using AJAX around the web part is whatever page (if any) that the user was on before navigating to the page with the AJAX functionality.  It does not go to the previous list item.I've copied the function from the "Next" button, and created my own xslt variables to pass into it for the previous item:<xsl:value-of select="ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$PreviousRow,'};dvt_startposition={',$PreviousPageData,'}'))" />This works fine UNLESS items are deleted from the List that is providing that data to the Web Part. Then my idea doesn't work because it is trying to look for ID numbers that do not exist in the list anymore.  Does anyone know of a way, or a built in variable from the ddwrt namespace, that will pass the previous list item to the "Previous" button no matter if there are deleted items (missing ID numbers) in the providing list? I would greatly appreciate some help.Thanks. Jason A. Graham http://jasonAgraham.spaces.live.com

Form Opens with same size as when closed



Using VS 2008 WinForm.

I've noticed that most applications will reopen the same size as when it was closed. For example, if the application was maximized when closed, it will reopen maximized. How do I achieve this?




Ajax Post Form


Ok I have an interesting new assignment that I am trying to come up with the best solution for. Basically I have a web application that needs to provide access to another system from within a secured login, each application is at a different site. Basically the third party company that has the system I need to connect with wants me to access their site via a form post. This would typically not be a problem other than I need to have the option to connect from inside of pretty much every existing page withn the primary application. Each connection option will be some type of hyperlink that will then in turn target a new browser window to display the content from the third party. So obviously I cannot use the standard form post methods as the page form is already in use.

So my thought was to use Jquery Ajax Post, I use it all the time for typical Ajax functionality with other applications, but that is normally interaction with a webservice or webmethod. What I was thinking, is to create a post function to send all the required fields along to the third party company, without the need to actually create the form. Typically in the past when I have used this functionality I am returning some type of data that I just redisplay or interact with, but now I need to target a new browser and open the returned page. The third part

Why does ajax control not move onto form



Been following help video "Get Started with the ASP.NET AJAX Control Toolkit?" and I got as far as adding a Control from the Ajax toolbox but for some reason the control will not add to the form.

Anyone explain as to why might be.


ajax form, add textbox dynamically


Having FooTable1: id, name, lastname and FooTable2: idfromtable1, address... How can I make a view insert where i can have a button (ajax one) to add a textbox relative to FooTable2.address? I want it to work so people could add as many adresses as they want, jsut by clicking the button again to add a new field. I'd like to do so without using JQuery

Handling Form Controls After Ajax.BeginForm Submission


Currently I have a comments section integrated into a blog I am writing. 
The comments are Ajaxified, when you post a comment the comment list auto updates with the comment you just added. 
Everything is working great but I would like to do some cleanup after a comment is successfully posted. 
Specifically I would like to disable the textarea and submit button which I would have no issues doing through javascript by using the AjaxOption OnComplete parameter.
To avoid double posts or just plain abuse. I know I will need other safegaurds as well but this is my first step.
The thing is Ajax.BeginForm does not give the form an id or name so I can not reference the form in javascript.
Is there a workaround here? Can I disable these form controls from the controller? 

Here is my code.

<% using (Ajax.BeginForm("Details", new AjaxOptions {UpdateTargetId="divCommentList"})) {%>
    <p>Add Your Own Comment</p>
    <p><%= Html.TextArea("Comment1")%></p>
    <input type="submit" value="Add Comment" id="submit" />
    <% } %>


I have a simple add to cart function/form that is working. i would like to update a partialview 
in the master page that just gives the summary. when an action link is clicked it will update, but not using the ajax form.
i can understand why, but i don't know how to call an update or controler action on return. My controler for the add to 
cart is returning a json dataset. i just can't get it to the user control.
        public ActionResult AddToCart(int id, FormCollection collection)

            // Retrieve the product from the database
            int qty = 0;
            int.TryParse(collection["Qty"], out qty);
            var newItem = new ProductAddToCartViewModel();
            newItem.Product = Database.Products.Single(product => product.ProductId == id);
            newItem.Quantity = qty;
            // Add it to the shopping cart
            var cart = ShoppingCart.GetCart(this.HttpContext);

            var results = new ShoppingCartViewModel
                CartTotal = cart.GetTotal(),
                CartCount = cart.GetCount(),

BlockUI in case of page submit. (for normal and ajax form submit)


Hi I want to implement BlockUI, the requirement is as below

1) On page submit it should gray out the page, it can be a normal submit (eg. Button click handled in code behind without any update panel used in page.)

2) Should be grayed out till the page is fully loaded (in case of button click, Page redirect).

My application pages can have hierarchy nested master page or at least one master page.  

I want to gray out the page in any case if page is submitted, that the stuff i want to achieve.

Thanks in advance.


adding scroll bar & increase the size of form

I'm using visual basic in visual studio 2010. I am a begining designer.
I created several columns in form. In columns there are many textboxes for input.
I like to create a scroll bar in each column, but i don't know how to create it.
Also Can I increase the size of form since I need to put lots of textboxes

Form View with Ajax Tab , Is there a better way to do this?


Good day all,

I know there is a better, faster  way to do this but  I couldnt figure it out.



    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT Schools.SchoolID, Schools.Name, Schools.Address, Schools.City, Schools.Province, 
                        Schools.Postal, Schools.Phone, Schools.Fax, School_Pictures.PictureID, School_Pictures.ImageURL, 
                        School_Pictures.Height, School_Pictures.Width, School_Pictures.ALTtext, School_Pictures.Tooltip, 
                        FROM Schools INNER JOIN School_Pictures ON Schools.SchoolID = School_Pictures.SchoolID 
                        WHERE (Schools.SchoolID = 2003) ">
            <asp:FormParameter DefaultValue="2003" FormField="Form1" Name="2003" Type="Int32" />
<asp:SqlDataSource ID="SqlDataSource2" runat="server" 

Submit InfoPath Form Attachments one after another. Avoiding Sharepoint 50mb size limit


As the title says. How would I make an infopath form submit an attachment, then after being submitted; Submit the 2nd attachment, and so on.

The problem I'm running into is the 50mb file attachment limit in SharePoint. It is not an option to change this Max amount. This way the 4 attachments which are all around 15 mb, won't total 60mb at one time and go over the file size limit.


Microsoft AJAX CDN

Content delivery networks (CDNs) are composed of "edge cache" servers that are strategically placed around the world at key Internet network points. These "edge cache" servers can be used to cache and deliver all types of content - including images, videos, CSS and JavaScript files.

Using a CDN can significantly improve a website's end-user performance, since it enables browsers to more quickly retrieve and download content. For example, instead of having a browser request for an image traverse all the way across the Internet to your web server to download, a CDN can instead serve the request directly from a nearby "edge cache" server that might only be a single network hop away from your customer (making it return much faster - which makes your pages load quicker).

AJAX GridView Checkbox Select All in ASP.Net

In the previous article GridView Select Multiple Rows you learnt the multiple row selection in GridView control. Here you will get the C# code sample to select all the gridview rows using single checkbox server control. You can highlight the selected rows with different color and Font state Bold. If you want to use the selection values on different ASP.Net

AJAX GridView Paging and Sorting using C# in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend