Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The simplest way to add loading message
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
MVC
Title:
The simplest way to add loading message
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01553962
Message ID:
01553962
Views:
56
Hi everybody,

I see that we have AjaxForm and AJAX ActionLink, but what should I do if I want this behavior for a button?

Here is my view's code:
<div id="progress" class ="ui-progressbar">
    Loading...
</div>

@using (Ajax.BeginForm("Search", "Client",
    new AjaxOptions
    {
        HttpMethod = "GET",
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "searchResults"
      
    }))
{
    <fieldset>
        <legend>Search</legend>
        <label for="clientNo">Client No: </label>
        <input type="number" name="clientNo" class="numericOnly" /><br />
        <label for="clientName">Client Name: </label>
        <input type =  "text" size =25 data-autocomplete="@Url.Action("QuickSearch", "Client")"  name ="clientName" />
        <div>
            <input type="submit" value="Find / Refresh" />
        </div>
    </fieldset>
    
}
and I want the "Loading" message to automatically display when I click on the button and disappear when it finishes. What is the best way to acomplish this without using an AJAX Action Link? Or is there a way to have link look like a button?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform