Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi all..

I have an aspx page and in that I have portlet with refresh button. On the click of that button that portlet have to be refresh when I click the refresh button. I have form components textboxes, radio buttons and check boxes in that. I have to clear all those using using ajax refresh?

how to do that give me some suggestion...



Thanks.
Posted
Comments
King Fisher 5-Mar-14 8:18am    
use ajax updatepanel.

Here's an example in the all to nice for beginners W3Schools site:
* "Let AJAX change this text" example online[^]

I suggest though that you specify more about your needs so that we can tailor something that "hits the spot".

Cheers,
C
 
Share this answer
 
v2
XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#btnrefreshdata").click(function() {
                $.ajax({
                    type: "GET",
                    url: "Handler1.ashx",
                    contentType: "text",
                    success: function(data) {
                        $("#noofusersTD")[0].innerHTML = data;
                    }
                });
                return false;
            });
        });
    </script>
</head>
<body>
    <form id="login_form" runat="server">
    <table id="tbl">
        <tr>
            <td>
                DynamicData Table Using Jquery
            </td>
        </tr>
        <tr>
            <td>
                Current Users
            </td>
            <td id="noofusersTD">
                0
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" id="btnrefreshdata" value="FetchData" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900