Hi Team,
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Download : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string QS1;
string QS2;
QS1 = Request.QueryString["fname"];
QS2 = Request.QueryString["Doc"];
//Request.QueryString["Doc"];
string strData = QS2;
char[] separator = new char[] { '.' };
string[] strSplitArr = strData.Split(separator);
string Final2 = "." + strSplitArr[1];
string Final1 = strSplitArr[0];
string Path = QS1;
string FileName = Final1;
string Extension = Final2;
string type = "";
if (Extension != null)
{
switch (Extension.ToLower())
{
case ".htm":
case ".html" ...
Go to the complete details ...