Header Ads

Ms-office Applications to run Asp.net


Protected Sub Drp1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Drp1.SelectedIndexChanged
        Dim intSelcttext As String = Drp1.SelectedItem.Text
        Dim diag As New Diagnostics.Process
        diag.StartInfo.Arguments = Server.MapPath("Test.txt")
        Dim Splt As Array = intSelcttext.Split("-")
        If Splt(1) = "Powerpoint" Then Splt(1) = "Powerpnt"
        diag.StartInfo.FileName = Splt(1) & ".exe"
        diag.Start()

    End Sub



< html xmlns="http://www.w3.org/1999/xhtml"  >
< head runat="server" >
     < title &gtUntitled Page< /title >
< /head >
< body >
    < form id="form1" runat="server" >
    Select the Software to run
  < asp:DropDownList ID="Drp1" runat ="Server" AutoPostBack="True" >
  < asp:ListItem Text ="Ms-Winword" >< /asp:ListItem >
  < asp:ListItem Text ="MS-Excel" >< /asp:ListItem >
  < asp:ListItem Text ="Ms-Powerpoint" >< /asp:ListItem >
  < asp:ListItem Text ="Ms-Access" >< /asp:ListItem >
  < /asp:DropDownList >
      < /form >
< /body >
< /html >

No comments:

Powered by Blogger.