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);
        }
    }
}

Response.Redirect(path, "_blank", "menubar=0"); 
 
And add the below class 
 
public static class ResponseHelper 
public static void Redirect
(this HttpResponse response, string url, string target, string windowFeatures) 
if ((String.IsNullOrEmpty(target) || 
target.Equals("_self", StringComparison.OrdinalIgnoreCase)) && 
String.IsNullOrEmpty(windowFeatures)) 
{ response.Redirect(url); } 
else { Page page = (Page)HttpContext.Current.Handler; 
if (page == null) 
throw new InvalidOperationException(
"Cannot redirect to new window outside Page context."); } 
url = page.ResolveClientUrl(url); 
string script; 
if (!String.IsNullOrEmpty(windowFeatures)) 
{ script = @"window.open(""{0}"", ""{1}"", ""{2}"");"; } 
else { script = @"window.open(""{0}"", ""{1}"");"; } 
script = String.Format(script, url, target, windowFeatures); 
ScriptManager.RegisterStartupScript(page, typeof(Page), "Redirect", script, true); 
} } } 
 
 
OR
Use Java Script
ScriptManager.RegisterStartupScript(this.Page, typeof(Page), 
"Redirect", "window.open('Default.aspx', '_blank', 'menubar=0, width=906, 
height=550, scrollbars=1, status=0');", true); 

Upload only pdf files using Fileupload

  
 

if (fuUpload.HasFile)
                {
                    string FilePath = Server.MapPath("~/App_Data/Articles/");
                    string FileName = Path.GetFileName(fuUpload.FileName);
                    fuUpload.SaveAs(FilePath + FileName);
                }

If you are using FileUpload control inside Update Panel then use triggers

           
       

Dim strVideo As String= String.Empty

'I have a folder named assets in my website. e.g. "http://www.example.com/assets"

strVideo = "~\assets"
strVideo = Server.MapPath(strVideo)
Dim strValue() As String = Directory.GetFiles(strVideo)
For index As Integer = 0 To strValue.Length - 1
      dropdownlist1.Items.Add(strValue(index).Substring(strValue(index).LastIndexOf("\") + 1))
Next


Dear Friends
 
Don't know how much truth in these photos. It's a great invention if it rally works as it explains.
 
Let's wait..........

Smart Internet search will be able to do with a mobile device in the NEAR future 
A mobile device with Touch screen, built in camera, scanner, WiFi, google map (hopefully google earth), google search, image search… 

Like this way, when you can see a building through it, it gives you the image search result right on the spot.
 

Choose a building and touch a floor and it tells you more details of the building. You can use it when you want to know a car model, an insect name, what kind of food is served at a restaurant and how much, who built a bridge, etc. etc.

It's got a scanner built in.



so you can use it this way when you want to check the meaning of a word in the newspaper, book, magazine, etc. It would be much easier to read a real book. You can use the dictionary, wikipedia, thesaurus and anything else available on the web. What do you think? 

Indoor guide:Works in a building, airport, station, hospital, etc. 


Automatic simultaneous translation: here Latin to English. 


Search keyword: Helpful when you want to find out a word from a lot of text in newspaper/book.


Nutrition: This kind of function would be helpful for health freaks..



Getting data of a weather forecast, maybe this might be possible.