data fetching without page refresh

Last post 05-09-2008 8:20 AM by dotnet_bug. 14 replies.

Sort Posts:

  • data fetching without page refresh

    05-06-2008, 2:21 AM
    • Loading...
    • dotnet_bug
    • Joined on 02-07-2008, 5:31 AM
    • New Delhi
    • Posts 18

     

    hii all,

    i don't know abt ajax tech but i've heard that we can avoid whole page refresh while retrieving data , can any one tell me how can i get through this...

    jus provide me any tutorials , sample projects or anything that can help me...

    regards

    anant  

  • Re: data fetching without page refresh

    05-06-2008, 2:25 AM

    There are lots of tutorials on this website and on Microsoft's.  Have at them! :)

    If this answered your question, be sure to mark it as the answer. That way, everybody after you will know it's the answer also!
  • Re: data fetching without page refresh

    05-06-2008, 2:27 AM

    Hi,

    You will find lot of tutorials here

    http://www.asp.net/ 

    Mehedi Hasan


    Mark as answer if the post meets your requirement!
  • Re: data fetching without page refresh

    05-06-2008, 2:33 AM
    • Loading...
    • shayas
    • Joined on 02-06-2008, 12:42 PM
    • Sharjah,UAE
    • Posts 214

    There are many tutorials available just googled it get lot n lot and also you can get in here www.asp.net

    Yasser
    R&D Dept.
    Industry Networks.

    Please remember to mark as answers if this helps
  • Re: data fetching without page refresh

    05-06-2008, 2:50 AM
    • Loading...
    • vinz
    • Joined on 10-05-2007, 3:47 PM
    • Cebu Philippines
    • Posts 4,230

    dotnet_bug :

    i don't know abt ajax tech but i've heard that we can avoid whole page refresh while retrieving data , can any one tell me how can i get through this...

    Yes.. Using the ASPNET AJAX ScriptManager and UpdatePanel Control will avoid those annoying flickers on the page.. see link below

    http://www.asp.net/ajax/documentation/live/overview/UpdatePanelOverview.aspx
    http://www.asp.net/learn/ajax-videos/video-177.aspx

    Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post fixed your problem.


  • Re: data fetching without page refresh

    05-06-2008, 3:30 AM

    hi dotnet bug u need to use the Ajax update panel,script manager and Timer coner contol to bind the gridview  for particular time interval

    try the following code

    .aspx

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="first.aspx.cs" Inherits="filestream_first" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml" >

    <head runat="server">

    <title>Untitled Page</title>

    </head>

    <body onload="test()">

    <form id="form1" runat="server">

    <div>

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">

    </asp:Timer>

     

    <asp:GridView ID="GridView1" DataSourceID="SqlDataSource1" AutoGenerateEditButton="true" runat="server" AutoGenerateColumns="False">

    <Columns>

    <asp:BoundField DataField="name" HeaderText="Name" />

    <asp:TemplateField HeaderText="Last Loged On">

    <ItemTemplate>

    <%#Eval("logon", "{0:dd-MMM-yyyy}")%>

    </ItemTemplate>

    <EditItemTemplate>

    <asp:TextBox ID="d2" runat="server" Text='<%#Bind("logon","{0:dd-MMM-yyyy}")%>' ></asp:TextBox>

    <asp:ImageButton ID="ImageButton1"

    runat="server" CausesValidation="False" ImageUrl="~/img/Calendar_scheduleHS.png" />

    <ajaxToolkit:CalendarExtender TargetControlID="d2" Format="dd-MMM-yyyy" PopupButtonID="ImageButton1" ID="CalendarExtender1" runat="server">

    </ajaxToolkit:CalendarExtender>

    </EditItemTemplate>

    </asp:TemplateField>

    </Columns>

    </asp:GridView>

    </ContentTemplate>

    </asp:UpdatePanel>

     

     

    <asp:SqlDataSource ID="SqlDataSource1" SelectCommand="select name,logon from user_table" runat="server" ConnectionString="ur query string"></asp:SqlDataSource>

     

     

    </form>

    </body>

    </html>

     

    .aspx.cs

     

    protected void Timer1_Tick(object sender, EventArgs e)

    {

    GridView1.DataBind();

    }

  • Re: data fetching without page refresh

    05-06-2008, 3:35 AM
    • Loading...
    • rbansal44
    • Joined on 12-11-2007, 10:09 AM
    • Posts 64

    hi,

    well you can learn tutorials from the below site as...

    http://www.asp.net/ajax/

    thanks,

    rajiv

  • Re: data fetching without page refresh

    05-08-2008, 2:04 AM

    Hi,

    Firstly, you need to install 'ASP.NET 2.0 AJAX Extensions 1.0':  http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en  

    To achieve fetching without refreshing, you can put the button triggering into the UpdatePanel: 

            <asp:ScriptManager ID="ScriptManager1" runat="server" />
           
    <asp:UpdatePanel runat="server" id="HelloWorldPanel">
           
    <ContentTemplate>
               
    <asp:Button runat="server" id="SayHelloButton" text="Hello, world!" onclick="SayHelloButton_Click" />
               
    <br /><br />
               
    <asp:Label runat="server" id="HelloWorldLabel" />
           
    </ContentTemplate>
           
    </asp:UpdatePanel>

    The available tutorials you can learn about are as below.

    http://ajax.net-tutorials.com/

    http://www.asp.net/ajax/documentation/live/

    Hope it helps.

     

    ================================================
    Sincerely,
    Vince Xu
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question. This can be beneficial to other
    community members reading the thread.
  • Re: data fetching without page refresh

    05-08-2008, 2:31 AM
    • Loading...
    • kalyan1982
    • Joined on 04-10-2008, 8:28 AM
    • Johannesburg, South Africa
    • Posts 57

    Hi Anant,

    Go through these links below. This will definetly help you.

    http://www.codeproject.com/KB/ajax/IntroAjaxASPNET.aspx

    http://www.codeproject.com/KB/ajax/AjaxASPdotNET.aspx   (This link helped me too)

     

    Kalyan Krishna
    (.NET Developer)

    Cell: (+27) 72 878 1010
    Email: kalyandotnetdeveloper@gmail.com
  • Re: data fetching without page refresh

    05-08-2008, 3:16 AM
    • Loading...
    • geetasks
    • Joined on 03-12-2008, 6:24 AM
    • Posts 97
    In addition to AJAX you can also use javascript to fetch data
  • Re: data fetching without page refresh

    05-08-2008, 3:23 AM

    hi geetasks can u give the coding to fetch data using javascript

  • Re: data fetching without page refresh

    05-08-2008, 4:52 AM
    • Loading...
    • geetasks
    • Joined on 03-12-2008, 6:24 AM
    • Posts 97
    Hello, Right Now I am also working on it. The moment I will do it, I will send you the same.
  • Re: data fetching without page refresh

    05-09-2008, 5:17 AM
    • Loading...
    • dotnet_bug
    • Joined on 02-07-2008, 5:31 AM
    • New Delhi
    • Posts 18

    hello guys... i wanted to use ajax or anything that can help me to do this in dot net 1.1 , i know that in dot net 2.0 i can do that with some effort.. but i'ven't work on dot net 2.0, so can i do it in dot net 1.1???                                 

    regards

    anant

     

  • Re: data fetching without page refresh

    05-09-2008, 5:25 AM