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

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.


  • Finally, the Rupee will have a symbol like the Dollar ($) or the Euro (€) or the Pound (£). The Cabinet today finalized the design for the Rupee.
  • IIT post-graduate Uday Kumar’s entry has been selected out of five shortlisted designs as the new symbol for the Indian Rupee.
  • The government had organized a symbol design competition with a prize money of Rs 2.5 lakh. Five designs were shortlisted from a competition and all new notes will bear the design finally approved.
  • The growing influence of the Indian economy in the global space is said to have prompted this move that will result in the Indian rupee joining the select club of global currencies like the US dollar, the British Pound, European Euro and Japanese Yen that have unique symbols.
  • The abbreviation for the Indian Rupee, 'Re' or 'Rs' is also used by India's neighbors Pakistan, Nepal and Sri Lanka.


Getting used to using your keyboard exclusively and leaving your mouse behind will make you much more efficient at performing any task on any Windows system. Below are some of the Keyboard Shortcuts:

  • Windows key + R = Run menu
  • Windows Key + E = Explorer
  • ALT + Tab = Switch between Active Windows
  • ALT, Space, X = Maximize window
  • CTRL + Shift + Esc = Task Manager
  • Windows key + Break = System properties
  • Windows key + F = Search
  • Windows key + D = Hide/Display all windows
  • CTRL + C = copy
  • CTRL + X = cut
  • CTRL + V = paste
  • CTRL + Z = Undo
  • "Right-click" key next to the right Windows key on your keyboard.
  • [Alt] and [Esc] Switch between running applications
  • [Alt] and letter Select menu item by underlined letter
  • [Ctrl] and [Esc] Open Program Menu
  • [Ctrl] and [F4] Close active document or group windows (*does not work with some applications)
  • [Alt] and [F4] Quit active application or close current window
  • Ctrl] Lft., Rt. arrow Move cursor forward or back one word
  • Ctrl] Up, Down arrow Move cursor forward or back one paragraph
  • [F1] Open Help for active application
  • Windows+M Minimize all open windows
  • Shift+Windows+M Undo minimize all open windows
  • Windows+F1 Open Windows Help
  • Windows+Tab Cycle through the Taskbar buttons
  • Windows+Break Open the System Properties dialog box
  • Right SHIFT for eight seconds........ Switch FilterKeys on and off.
  • Left ALT +left SHIFT +PRINT SCREEN....... Switch High Contrast on and off.
  • Left ALT +left SHIFT +NUM LOCK....... Switch MouseKeys on and off.
  • SHIFT....... five times Switch StickyKeys on and off.
  • NUM LOCK...... for five seconds Switch ToggleKeys on and off.
  • END....... Display the bottom of the active window.
  • HOME....... Display the top of the active window.
  • NUM LOCK+ASTERISK....... on numeric keypad (*) Display all subfolders under the selected folder.
  • NUM LOCK+PLUS SIGN....... on numeric keypad (+) Display the contents of the selected folder.
  • NUM LOCK+MINUS SIGN....... on numeric keypad (-) Collapse the selected folder.
  • LEFT ARROW...... Collapse current selection if it's expanded, or select parent folder.
  • RIGHT ARROW....... Display current selection if it's collapsed, or select first subfolder.
  • Delete. DELETE
  • Delete selected item permanently without placing the item in the Recycle Bin. SHIFT+DELETE
  • Copy selected item. CTRL while dragging an item
  • Create shortcut to selected item. CTRL+SHIFT while dragging an item
  • Rename selected item. F2
  • Move the insertion point to the beginning of the next word. CTRL+RIGHT ARROW
  • Move the insertion point to the beginning of the previous word. CTRL+LEFT ARROW
  • Move the insertion point to the beginning of the next paragraph. CTRL+DOWN ARROW
  • Move the insertion point to the beginning of the previous paragraph. CTRL+UP ARROW
  • Highlight a block of text. CTRL+SHIFT with any of the arrow keys
  • Select more than one item in a window or on the desktop, or select text within a document. SHIFT with any of the arrow keys
  • Select all. CTRL+A
  • Search for a file or folder. F3
  • View properties for the selected item. ALT+ENTER
  • Opens the shortcut menu for the active window. ALT+SPACEBAR
  • Cycle through items in the order they were opened. ALT+ESC
  • Display the shortcut menu for the selected item. SHIFT+F10
  • Display the System menu for the active window. ALT+SPACEBAR
  • Refresh the active window. F5
  • View the folder one level up in My Computer or Windows Explorer. BACKSPACE
  • Cancel the current task. ESC
  • SHIFT when you insert a CD into the CD-ROM drive Prevent the CD from automatically playing.
  • Move forward through tabs. CTRL+TAB
  • Move backward through tabs. CTRL+SHIFT+TAB
  • Move forward through options. TAB
  • Move backward through options. SHIFT+TAB
  • Select or clear the check box if the active option is a check box. SPACEBAR
  • Select a button if the active option is a group of option buttons. Arrow keys
  • Display Help. F1
  • Display the items in the active list. F4      
  • If you have a Microsoft Natural Keyboard, or any other compatible keyboard that includes the Windows logo key and the Application key , you can use these keyboard shortcuts:
  • Display or hide the Start menu. WIN Key
  • Display the System Properties dialog box. WIN Key+BREAK
  • Show the desktop. WIN Key+D
  • Minimize all windows. WIN Key+M
  • Restores minimized windows. WIN Key+Shift+M
  • Open My Computer. WIN Key+E
  • Search for a file or folder. WIN Key+F
  • Search for computers. CTRL+WIN Key+F
  • Display Windows Help. WIN Key+F1
  • Lock your computer if you are connected to a network domain, or switch users if you are not
  • connected to a network domain. WIN Key+ L
  • Open the Run dialog box. WIN Key+R
  • Open Utility Manager. WIN Key+U
  • Type the following commands in your Run Box (Windows Key + R) or Start Run
  • devmgmt.msc = Device Manager
  • msinfo32 = System Information
  • cleanmgr = Disk Cleanup
  • ntbackup = Backup or Restore Wizard (Windows Backup Utility)
  • mmc = Microsoft Management Console
  • excel = Microsoft Excel (If Installed)
  • msaccess = Microsoft Access (If Installed)
  • powerpnt = Microsoft PowerPoint (If Installed)
  • winword = Microsoft Word (If Installed)
  • frontpg = Microsoft FrontPage (If Installed)
  • notepad = Notepad
  • wordpad = WordPad
  • calc = Calculator
  • msmsgs = Windows Messenger
  • mspaint = Microsoft Paint
  • wmplayer = Windows Media Player
  • rstrui = System Restore
  • netscp6 = Netscape 6.x
  • netscp = Netscape 7.x
  • netscape = Netscape 4.x
  • waol = America Online
  • control = Opens the Control Panel
  • control printers = Opens the Printers Dialog

To Download Source Code Click here >System Scheduler.rar

  1. Open Visual Studio and Click on New Project Window from template.
  2. Place 2Labels, 1DateTimePicker, 1ComboBox, 1Timer, 1NotifyIcon and 3Buttons.
  3. Set Properties for Label1
    1. Text = "Set Time for Operation" 
  4. Set Properties for Label2
    1. Text = "Select Operation"   
  5. Set Properties for DateTimePicker
    1. Name = "dtpTime"
    2. Format = "Time"
    3. ShowUpDown = "True"
  6. Set Properties for ComboBox1
    1. Name = "cboOperation"
    2. DropDownStyle = "DropDownlist"
    3. Items = "Log Off, Restart, ShutDown"
  7. Set Properties for Button1
    1. Name = "btnOk"
    2. Text = "Ok"
  8. Set Properties for Button2
    1. Name = "btnCancel"
    2. Text = "Cancel" 
  9. Set Properties for Button3
    1. Name = "btnAbout"
    2. Text = "?"
  10. Now use the Below give Code.  

Code:



Help From : http://www.devasp.net/net/articles/display/513.html

To Download Source Code Click here >System Scheduler.rar

You cannot change your future... but, u can change ur habits... And sure ur habits will change ur future. -Bernard Shaw

Dream is not what you see in sleep. It is something that does not let you sleep. -Abdul Kalam

Name    : Muthukumar Nadar
email   : nadarmuthukumar@yahoo.co.in
Mobile  : 9833240124
City    : Mumbai
State   : Maharashtra
Country : India

So guys, as if now this is all about my contact details if anybody have any doubt on anything are most welcome to contact me, and i assure you that i will try my best to Solve your problem.

And Student looking for IT Projects can also Contact me.

To Download Source Code Click Here > Save image in MySettings.rar

  1. Open Visual Studio and Click on New Project window from template.
  2. Place Four buttons and a Picture box.
  3. Set Name Properties of :
    1. Button1 = "btnBrowse"
    2. Button2 = "btnSave"
    3. Button3 = "btnDelete"
    4. Button4 = "btnExit"
    5. Picturebox1 = "pctImage" 
    6. OpenFileDialog1 = "ofdImage"
    7. Form1 = "frmImageSave"
  4.Set Text Properties of :
    1. Button1 = "Browse"
    2. Button2 = "Save"
    3. Button3 = "Delete"
    4. Button4 = "Exit"
    5. Form1 = "Save Image"
  5.Goto Project Menu and Click on SaveImage in MySettings Properties.
  6.From the Left side Select Settings Tab
  7.Now Set the Name as Image.
  8.Select the Type and click on  Browse.
  9. Now a Window will open. In that click on System.Collections. Under that Click on ArrayList. 

10. Select Scope as User.
11. Set Value Field as Empty. I mean don't Enter any value.
12. Right Click on Form and click on View Code.
13. And Paste the following Code.

Imports System.IO

Public Class frmImageSave

    Private Sub frmImageSave_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not My.Settings.Image.Count = 0 Then
            Dim bytImage(My.Settings.Image.Count - 1) As Byte
            For index As Integer = 0 To My.Settings.Image.Count - 1
                bytImage(index) = My.Settings.Image.Item(index)
            Next
            Dim MS As New MemoryStream(bytImage)
            pctImage.Image = Image.FromStream(MS)
        Else
            pctImage.Image = Nothing
        End If
    End Sub

    Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
        With ofdImage
            .InitialDirectory = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\"
            .Filter = "JPEGs|*.jpg"
            .FilterIndex = 1
        End With
        If ofdImage.ShowDialog = Windows.Forms.DialogResult.OK Then
            If FormatNumber(FileLen(ofdImage.FileName) / 1024, 0) > 30 Then
                MessageBox.Show("Please Select Image of Size less then 30kbs", "Save Image", MessageBoxButtons.OK, MessageBoxIcon.Information)
                Exit Sub
            End If
            With pctImage
                .Image = Image.FromFile(ofdImage.FileName)
                .SizeMode = PictureBoxSizeMode.StretchImage
            End With
        End If
    End Sub

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        Try
            Dim MS As New MemoryStream
            pctImage.Image.Save(MS, Imaging.ImageFormat.Jpeg)
            Dim bytImage() As Byte = MS.GetBuffer
            For index As Integer = 0 To bytImage.Length - 1
                My.Settings.Image.Add(bytImage(index))
            Next
            My.Settings.Save()
            MessageBox.Show("Image Saved Successfully.", "Save Image", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch ex As Exception
            MessageBox.Show(ex.Message & " btnSave_Click")
        End Try
    End Sub

    Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
        My.Settings.Image.Clear()
        My.Settings.Save()
        MessageBox.Show("Image Deleted Successfully.", "Save Image", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
        Application.Exit()
    End Sub

End Class

To Download Source Code Click Here > Save image in MySettings.rar

    Life is Like a piano
    White Keys are Happy moments
    n Black Keys are Sad moments
    But remember both Keys are played
    together to give sweet music
    its Life.

    To Download Source Code Click Here > image to database.rar

    1. Open Visual Studio and Click on New Project Windows from template
    2. Place PictureBox, ListBox, OpenFileDialog, and Four Buttons
    3. Set Name Properties of : 
      1. PictureBox = pctImage, 
      2. ListBox = lstImages, 
      3. Button1 = btnBrowse, 
      4. Button2 = btnSave, 
      5. Button3 = btnDelete, 
      6. Button4 = btnExit
    4. Set Text Properties of : 
      1. Button1 = Browse, 
      2. Button2 = Save, 
      3. Button3 = Delete, 
      4. Button4 = Exit. 
    5. Right Click on the form and Click on View code
    6. And type the following Code.

    Imports System.Data.SQLite
    Imports System.IO
    Imports System.Drawing.Image

    Public Class Form1

        Private Conn As New SQLiteConnection("data Source =" & Application.StartupPath & "\Images.img")
        Private Adpt As SQLiteDataAdapter
        Private strFileName As String

        Private Sub DisplayInList()
            Dim strQry As String = "SELECT imgName FROM MyImage"
            Adpt = New SQLiteDataAdapter(strQry, Conn)
            Dim Dt As New DataTable
            Adpt.Fill(Dt)
            lstImages.DataSource = Nothing
            lstImages.Items.Clear()
            lstImages.DisplayMember = "imgName"
            lstImages.DataSource = Dt
        End Sub

        Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
            With OpenFileDialog1
                .InitialDirectory = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\"
                .Filter = "JPEGs|*.jpg"
                .FilterIndex = 1
            End With
            If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
                With pctImage
                    .Image = Image.FromFile(OpenFileDialog1.FileName)
                    .SizeMode = PictureBoxSizeMode.StretchImage
                End With
                strFileName = OpenFileDialog1.FileName.ToString
            End If
        End Sub

        Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click
            Dim cmd As New SQLiteCommand("DELETE FROM MyImage WHERE imgName = '" & lstImages.Text & "'", Conn)
            cmd.ExecuteNonQuery()
            DisplayInList()
        End Sub

        Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
            Try
                Dim ms As New MemoryStream
                pctImage.Image.Save(ms, Imaging.ImageFormat.Jpeg)
                Dim arrImage() As Byte = ms.GetBuffer
                ms.Close()
                Try
                    Dim strImageName As String = strFileName.Substring(strFileName.LastIndexOf("\") + "1")
                    Dim InsQuery As String = "INSERT INTO MyImage (imgName,imgPict) VALUES(@imgName,@imgPict)"
                    Dim Cmd As New SQLiteCommand(InsQuery, Conn)
                    Cmd.Parameters.Add("@imgName", DbType.String, 50).Value = strImageName
                    Cmd.Parameters.AddWithValue("@imgPict", arrImage)
                    Cmd.ExecuteNonQuery()
                Catch ex As Exception
                    MessageBox.Show("Please select Image to Save")
                End Try
                DisplayInList()
            Catch ex As Exception
                MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Conn.Open()
            If lstImages.Items.Count > 0 Then
                lstImages.SetSelected(0, True)
            End If
            DisplayInList()
        End Sub

        Private Sub lstImages_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstImages.SelectedValueChanged
            Try
                Dim Ds As New DataSet
                Dim strQry As String = "SELECT * FROM MyImage WHERE imgName = '" & lstImages.Text & "'"
                Adpt = New SQLiteDataAdapter(strQry, Conn)
                Adpt.Fill(Ds)
                If Not Ds.Tables(0).Rows.Count = 0 Then
                    Dim arrayImage() As Byte = Ds.Tables(0).Rows(0).Item(1)
                    Dim ms As New MemoryStream(arrayImage)
                    pctImage.Image = Image.FromStream(ms)
                    pctImage.SizeMode = PictureBoxSizeMode.StretchImage
                Else
                    pctImage.Image = Nothing
                End If
              
            Catch ex As Exception
                MessageBox.Show(ex.Message, Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
            End Try
        End Sub

        Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
            If Conn.State = ConnectionState.Open Then Conn.Close()
            Application.Exit()
        End Sub

    End Class

    To Download Source Code Click Here > image to database.rar