Preventing / Blocking Page Review after Logout with Forms Authentication

After logging out we can prevent getting previous page or information by doing following things.

Add Code to Page Load event:


Or We can use following code
Continue reading

Export to pdf ( Create pdf on fly ) using and C#

Consider following code for creating pdf document on fly using in C#.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace WebApplication1
    public partial class WebForm1 : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)

 Continue reading 

How to enable Paging in GridView in or Grid View Paging doesn’t work

Do Following steps.

–> Set EnablePaging and Sorting Callback = True from Propertise.
Set your data source as general way.

Now do another extra job for working paging
Write down the following code under PageIndexGhanging Event

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
      //Create your data set or table as u did 
        GridView1.PageIndex = e.NewPageIndex;
        GridView1.DataSource = ds;

Filter data by date time in MS access, Select only date without selecting time from date time field in MS Access

Select * from TransactionInfo where CDate(Int([CreatedDate])) between #2010-05-04# and #2010-05-05#
it will return date like


Select * from TransactionInfo where [CreatedDate] between #2010-05-04# and #2010-05-05#

it will return

Continue reading