Hi

I created the web project using Asp.net.In that web site It read from database and show
result in data grid.There is save button using that I can save it into excel file.the problem if I selected data with one month(20010-01-01 to 2010-01-31) ,then there are more data,but in data grid its show only only first date(2010-01-01) data only.So how do u move into next data page in data grid?Second problem is if i click on save button its only save only first date data into excel file.Please help me.Below I mention the coding that I use to export data in excel file.

private void ExportGridView(string str)
    {
        string filename = str;
        string attachment = "attachment; filename="+filename;

        Response.ClearContent();

        Response.AddHeader("content-disposition", attachment);

        Response.ContentType = "application/ms-excel";

        StringWriter sw = new StringWriter();

        HtmlTextWriter htw = new HtmlTextWriter(sw);

        Dataview1.RenderControl(htw);

        Response.Write(sw.ToString());

        Response.End();

    }

Hi

There is save button using that I can save it into excel file.the problem if I selected data with one month(20010-01-01 to 2010-01-31) ,then there are more data,but in data grid its show only only first date(2010-01-01) data only.

Are you looking for paging? Please post the query and also check the format of date.

HI

Format is okay,because if i filter data between 2010-01-01 to 2010-01-30 there are more than 500 records.but problem is in data grid it only show 2010-01-01 data only,if I export it into excel file,there are only 2010-01-01 data available.After that I select as start date as 2010-01-02 and end data 2010-01-02 so in that case there are data available for 2010-01-02.So why It doesn't appear in first case.

Thanks
Tank50

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.