When you try to set textbox readonly, it loses its value...
Reason is readonly controls are not posted back to server.

To solve the above problem use the below code.



Ref : here

Design View


Code View


Ref : here

use iframe to show your pdf file.
use paramater"#toolbar=0" to hide the toolbar of pdf file after you url ends
e.g.
src="sdsd/sdsd.pdf#toolbar=0"

xp_cmdshell 'IF EXIST D:\Delete\Delete.txt. del D:\Delete\Delete.txt.'

using System;
using System.Data;
using System.Configuration;
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;

public partial class _Default : System.Web.UI.Page
{
    DataTable dt = new DataTable("Menu");
    protected void Page_Load(object sender, EventArgs e)
    {
        dt.Columns.Add("MenuId");
        dt.Columns.Add("MenuName");
        dt.Columns.Add("ParentMenuId");
        dt.Columns.Add("NavigationUrl");
        dt.Rows.Add(new string[] { "1","Home","0","http://www.google.com" });
        dt.Rows.Add(new string[] { "2", "Sub_Home_1", "1", "http://www.yahoo.com" });
        dt.Rows.Add(new string[] { "3", "About Us", "0", "http://www.reliancemoney.com" });
        dt.Rows.Add(new string[] { "4", "Sub_AboutUs_1", "3", "http://www.relince.com" });
        dt.Rows.Add(new string[] { "5", "Sub_AboutUs_2", "3", "http://www.codeproject.com" });
        dt.Rows.Add(new string[] { "6", "Contact Us", "0", "http://www.sqlauthority.com" });
        dt.Rows.Add(new string[] { "7", "Sub_Contact Us_1", "6", "http://www.crm.com" });
        dt.Rows.Add(new string[] { "8", "Sub_Sub_Contact Us_1", "7", "http://www.firebug.com" });
        dt.Rows.Add(new string[] { "9", "Sub_Sub_Home_1", "2", "http://www.dotnet.com" });
        ShowMenu(mnuTest.Items,0);
    }

    private void ShowMenu(MenuItemCollection nodes, int parentMenuId)
    {
        int MenuID;
        string MenuName, Url = string.Empty;
       
        DataRow[] ChildMenu = dt.Select("parentMenuId='" + parentMenuId + "'");
        if (ChildMenu.Length == 0) return;
        foreach (DataRow child in ChildMenu)
        {
            MenuID = Convert.ToInt32(child.ItemArray[0]);
            MenuName = Convert.ToString(child.ItemArray[1]);
            Url = Convert.ToString(child.ItemArray[3]);
            MenuItem NewNode = new MenuItem(MenuName, MenuID.ToString(),string.Empty,Url);
            nodes.Add(NewNode);
            ShowMenu(NewNode.ChildItems, MenuID);
        }
    }
}