Pages

Wednesday 12 April 2017

whatsapp

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace WhatsAppConsole
{
    public class WhatsAppConsoleProgram
    {
        IWebDriver driver;
        static void Main(string[] args)
        {
            WhatsAppConsoleProgram pro = new WhatsAppConsoleProgram();
            pro.ReadJSONData(@"\TestData\package.json");
        }

        public void ReadJSONData(string jsonFilePath)
        {
            driver = new ChromeDriver(@"\SeleniumDrivers\");
            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl("https://web.whatsapp.com/");
            while (true)
            {
                Thread.Sleep(1000);
                if (isInSecondPage())
                {
                    Thread.Sleep(15000);
                    this.moveToLogedInWindow();
                }               
            }           
        }

        private bool isInSecondPage()
        {
            try
            {
                if (driver.FindElement(By.XPath("//*[@id='window']/div[1]/div[1]/div/img")).Displayed == true)
                    return false;
            }catch (Exception ex){ }
            return true;
        }

        private void moveToLogedInWindow()
        {
            StreamReader file = File.OpenText(@"\TestData\package.json");
            JsonTextReader reader = new JsonTextReader(file);
            JObject o2 = (JObject)JToken.ReadFrom(reader);
            IList<JToken> results = o2["data"].Children().ToList();
            foreach (JToken result in results)
            {
                Thread.Sleep(5000);
                string user = result["searchUser"].ToString();
                string type = result["Advance"]["Type"].ToString();
                string fileName = string.Empty;
                if (result["Advance"]["FileName"] != null)
                    fileName = result["Advance"]["FileName"].ToString();
                string caption = result["Advance"]["Caption"].ToString();
                try
                {
                    this.SendMSGToMultipleUsers(user, type, caption, @"\TestData\" + fileName);
                    //Need to update sent Status
                }
                catch (Exception ex)
                {
                    // //Need to update failure Status
                   // Update the Admin
                }
            }
        }

        public void SendMSGToMultipleUsers(string searchUser, string attachType, string postCaption, string fileName)
        {
            try
            {
                IWebElement txt_Search = driver.FindElement(By.XPath(".//*[@id='side']//input[@class='input input-search']"));
                txt_Search.Click();
                txt_Search.SendKeys(searchUser);
                Thread.Sleep(5000);
                IWebElement selectUsr_Click = driver.FindElement(By.XPath(".//*[@id='pane-side']//div[@class='chat-body']"));
                selectUsr_Click.Click();
                Thread.Sleep(5000);
                switch (attachType)
                {
                    case "Message":
                        SendMessage(postCaption);
                        break;
                    case "Image":
                        sendFile(attachType, postCaption, fileName);
                        break;
                    case "Document":
                        sendFile(attachType, postCaption, fileName);
                        break;
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        private void sendFile(string attachType, string postCaption, string fileName)
        {
            IWebElement link_Attach = link_Attach = driver.FindElement(By.XPath(".//*[@id='main']//button[@class='icon icon-clip']"));
            link_Attach.Click();
            Thread.Sleep(3000);
            IWebElement link_Gallery = driver.FindElement(By.XPath(".//*[@id='main']/header/div[3]/div/div[2]/span/div/div/ul/li[1]/button"));
            if (attachType == "Document")
                link_Gallery = driver.FindElement(By.XPath(".//*[@id='main']/header/div[3]/div/div[2]/span/div/div/ul/li[3]/button"));
            link_Gallery.Click();
            Thread.Sleep(3000);
            this.FileUpload(link_Gallery, fileName);
            if (attachType != "Document")
            {

                IWebElement txt_InputCaption = driver.FindElement(By.XPath(".//*[@id='app']//div[@class='input input-text']"));
                txt_InputCaption.Click();
                txt_InputCaption.SendKeys(postCaption);
                Thread.Sleep(500);
                IWebElement btn_ClickSend = driver.FindElement(By.XPath(".//*[@id='app']//button[@class='btn btn-round btn-l']"));
                btn_ClickSend.Click();
            }
            else
            {
                IWebElement btn_ClickSend = driver.FindElement(By.XPath(".//*[@id='app']//button[@class='btn btn-round btn-l']"));
                btn_ClickSend.Click();
                Thread.Sleep(3000);
                SendMessage(postCaption);
            }

        }

        private void SendMessage(string message)
        {
            IWebElement txt_Input = driver.FindElement(By.XPath(".//*[@id='main']//div[@class='input']"));
            txt_Input.Click();
            txt_Input.SendKeys(message);
            Thread.Sleep(3000);
            IWebElement btn_Text = driver.FindElement(By.XPath(".//*[@id='main']//button[@class='icon btn-icon icon-send send-container']"));
            btn_Text.Click();
            Thread.Sleep(5000);
        }
       
        public void FileUpload(IWebElement controlGallery, string fileName = null)
        {
            System.Windows.Forms.SendKeys.SendWait(fileName);
            System.Windows.Forms.SendKeys.SendWait("{ENTER}");
            Thread.Sleep(5000);
        }
    }
}

Wednesday 17 June 2015

<script type="text/javascript">
// Author: ideal-helper.com
// Description: Photo slideshow to add your photos and embed into your website and blog post.

var x=0;

function rotate(num){
fs=new Array("http://www.hdwallpapersmaza.com/wp-content/uploads/2013/11/bmw-car-d-blue-hd-90922.jpg",
"http://www.diplomatic-corporate-services.si/uploads/diplomatic-corporate-services.si_dev/MERCEDES_NOTRANJA_AUTO.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdN7Gnnye1Dc6rkiZGCAvD118DYkqkvdyUZ6DQbR25U3M4aKYOMLkl4OGoEh0ZtCWsXHqODrMK2eRE5CMyRgWRy4jrq9wWXUjsV6x8YMvzr20aI5wLHz-OtZBtelJQSfyzWrwcrm_Qooo/s1600/audi.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3IuMtmaq7nSAbV8zI3iow-yU0dAAY_rgef3x5J-yS-zB5CMnov812JTl8Nh1aPGMJ1hP1FX_5s3x5Et6qctD8JBxzhrQcPIQlD2-U4tgp-ITuydyCMedIQM_pIgnkcEvDE0mUlrCIax6S/s1600/new-dacia-duster-facelift-2014.jpg",
"http://www.carspicturesdb.com/wp-content/uploads/2012/10/Ford-focus-was-officially-revealed-today-at-the-detroit-auto.jpg");
x=num%fs.length;
if(x<0) x=fs.length-1;
document.images.show.src=fs[x];
}

function auto() {
rotate(++x);setTimeout("auto()", 2000);
}
</script>
<body onLoad="auto();"
<form name="ff">
<img name="show" width="643" height="361">
</form>
</body>
<script type="text/javascript">
// Author: ideal-helper.com
// Description: Photo slideshow to add your photos and embed into your website and blog post.

var x=0;

function rotate(num){
fs=new Array("http://www.hdwallpapersmaza.com/wp-content/uploads/2013/11/bmw-car-d-blue-hd-90922.jpg",
"http://www.diplomatic-corporate-services.si/uploads/diplomatic-corporate-services.si_dev/MERCEDES_NOTRANJA_AUTO.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdN7Gnnye1Dc6rkiZGCAvD118DYkqkvdyUZ6DQbR25U3M4aKYOMLkl4OGoEh0ZtCWsXHqODrMK2eRE5CMyRgWRy4jrq9wWXUjsV6x8YMvzr20aI5wLHz-OtZBtelJQSfyzWrwcrm_Qooo/s1600/audi.jpg",
"https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3IuMtmaq7nSAbV8zI3iow-yU0dAAY_rgef3x5J-yS-zB5CMnov812JTl8Nh1aPGMJ1hP1FX_5s3x5Et6qctD8JBxzhrQcPIQlD2-U4tgp-ITuydyCMedIQM_pIgnkcEvDE0mUlrCIax6S/s1600/new-dacia-duster-facelift-2014.jpg",
"http://www.carspicturesdb.com/wp-content/uploads/2012/10/Ford-focus-was-officially-revealed-today-at-the-detroit-auto.jpg");
x=num%fs.length;
if(x<0) x=fs.length-1;
document.images.show.src=fs[x];
}

function auto() {
rotate(++x);setTimeout("auto()", 2000);
}
</script>
<body onLoad="auto();"
<form name="ff">
<img name="show" width="643" height="361">
</form>
</body>

ExtJS MVC Grid




Steps to Create Extjs MVC Application

1. Create a Project Folder (Example Name of the Project Folder  is 'MVC')
Please follow the below structure to create the files and folder with the Project Folder.

      MVC--->ExtJS Framework Folder
           |------>Index.html File
           |------>app.js File
           |------>app Folder
                         |--------------> controller Folder
                                                    |--------------------> MainController.js File
                         |--------------> view Folder
                                                    |--------------------> MainView.js File
                         |--------------> store Folder
                                                    |--------------------> MainStore.js File
                         |--------------> model Folder
                                                    |--------------------> MainModel.js File
                         |--------------> Application.js File

Index.html

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="C:\MVC\ext-5.1.0\packages\ext-theme-classic\build\resources\ext-theme-classic-all.css" type="text/css" rel="stylesheet"/>
<script src="C:\MVC\ext-5.1.0\build\ext-all-debug.js" type="text/javascript"></script>
<script src="C:\MVC\app.js" type="text/javascript"></script>
</head>

</html>

app.js

Ext.application({
name:'MVC',
extend:'MVC.Application',
autoCreateViewport:'MVC.view.MainView'

});

Application.js

Ext.define('MVC.Application',{
extend:'Ext.app.Application',
name:'MVC',
views:['MVC.view.MainView'],
controllers:['MVC.controller.MainController'],
stores:['MVC.store.MainStore']

});

MainController.js

Ext.define('MVC.controller.MainController',{
extend:'Ext.app.Controller',
models:['MVC.model.MainModel'],
stores:['MVC.store.MainStore'],
views:['MVC.view.MainView']

});

MainView.js

Ext.define('MVC.view.MainView',{
extend:'Ext.container.Viewport',
items:[{
xtype:'grid',
height:300,
title:'MVC Grid',
store:'MVC.store.MainStore',
columns:[{header:'First Name',dataIndex:'fname'},
{header:'Last Name',dataIndex:'lname'}]
}]

});

MainModel.js

Ext.define('MVC.model.MainModel',{
extend:'Ext.data.Model',
fields:[{name: 'fname', type: 'string'},
         {name: 'lname',  type: 'string'}]

});

MainStore.js

Ext.define('MVC.store.MainStore',{
extend:'Ext.data.Store',
model:'MVC.model.MainModel',
autoLoad:true,
/*proxy:{
type:'ajax',
url:'Data/name.json',
reader:{
type:'json'
}
}*/
data : [
         {fname: 'Ed',lname: 'Spencer'},
         {fname: 'Tommy', lname: 'Maintz'},
         {fname: 'Aaron', lname: 'Conran'},
         {fname: 'Jamie', lname: 'Avins'}
     ]

});

Wednesday 19 November 2014

Binding sql data to the gridview and filter the data based on dropdown selection and Cascading.

webform1

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

</head>

<body>

<form id="form1" runat="server">

<div>




 
<br />

<asp:Label ID="Label2" runat="server" Text="Designation "></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">

</asp:DropDownList>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Label ID="Label3" runat="server" Text="Employees "></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:DropDownList ID="DropDownList2" runat="server">

</asp:DropDownList>

<br />

<br />

<asp:GridView ID="GridView1" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2">

<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />

<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />

<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />

<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />

<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />

<SortedAscendingCellStyle BackColor="#FFF1D4" />

<SortedAscendingHeaderStyle BackColor="#B95C30" />

<SortedDescendingCellStyle BackColor="#F1E5CE" />

<SortedDescendingHeaderStyle BackColor="#93451F" />

</asp:GridView>

<br />

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>




 
<br />

<br />

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add" />

<br />

<asp:Label ID="Label4" runat="server" Text="Users "></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged">

</asp:DropDownList>

<asp:GridView ID="GridView2" runat="server" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2">

<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />

<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />

<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />

<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />

<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />

<SortedAscendingCellStyle BackColor="#FFF1D4" />

<SortedAscendingHeaderStyle BackColor="#B95C30" />

<SortedDescendingCellStyle BackColor="#F1E5CE" />

<SortedDescendingHeaderStyle BackColor="#93451F" />

</asp:GridView>




 
</div>

</form>

</body>

</html>

webform1.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data.SqlClient;

using System.Data;

using System.Xml;

using System.Xml.Linq;

using System.IO;

namespace WebApplication2



{
 
public partial class WebForm1 : System.Web.UI.Page



{
 
int desgid = 0;

SqlConnection con = new SqlConnection("Data Source=abc;Initial Catalog=master;Trusted_Connection=True;");

DataSet ds;

protected void Page_Load(object sender, EventArgs e)



{
 
if (!IsPostBack)



{

FillCombo();

FillComboConnectionless(desgid);

BindXmlDataCombo();

}

FillGrid(desgid);

BindXmlDataGrid();

}
 
public void XmlData()



{
 
XmlTextReader xmlreader = new XmlTextReader(Server.MapPath("XMLFile1.xml"));

ds = new DataSet();



ds.ReadXml(xmlreader);

xmlreader.Close();



}
 
public void BindXmlDataGrid()



{

XmlData();

GridView2.DataSource = ds;

GridView2.DataBind();



}
 
public void BindXmlDataCombo()



{

XmlData();

DropDownList3.DataSource = ds;
 
DropDownList3.DataTextField = "Job";

DropDownList3.DataValueField = "Job";



DropDownList3.DataBind();

}
 
public void FillCombo()



{

con.Open();
 
SqlCommand cmd1 = new SqlCommand("select 0 desgid,'All' desgname union select desgid,desgname from desg", con);

SqlDataReader dr = cmd1.ExecuteReader();



DropDownList1.DataSource = dr;
 
DropDownList1.DataTextField = "desgname";

DropDownList1.DataValueField = "desgid";



DropDownList1.DataBind();

con.Close();

}
 
public void FillComboConnectionless(int desgid)



{
 
DataSet ds = new DataSet();

string s = "";

if (desgid == 0)

s = "select 0 empid,'All' empname union select empid,empname from emp";

else

s = "select empid,empname from emp where desgid=" + desgid;

SqlDataAdapter da = new SqlDataAdapter(s, con);



da.Fill(ds);
 
//DropDownList2.DataSource = Enum.GetValues(typeof(Colors));// ds;



DropDownList2.DataSource = ds;
 
DropDownList2.DataTextField = "empname";

DropDownList2.DataValueField = "empid";



DropDownList2.DataBind();

}
 
public void FillGrid(int desgid)



{

con.Open();
 
string s = "";

if (desgid == 0)

s = "select empname,desgname from emp as e inner join desg as d on e.desgid=d.desgid";

else

s = "select empname,desgname from emp as e inner join desg as d on e.desgid=d.desgid where d.desgid=" + desgid;

SqlCommand cmd = new SqlCommand(s, con);

SqlDataReader dr = cmd.ExecuteReader();



GridView1.DataSource = dr;

GridView1.DataBind();
 
Label1.Text = "No of Records in the above table are <b>" + GridView1.Rows.Count + "</b>";



con.Close();

}
 
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)



{
 
FillGrid(Convert.ToInt32(DropDownList1.SelectedValue.ToString()));

FillComboConnectionless(Convert.ToInt32(DropDownList1.SelectedValue.ToString()));



}
 
protected void Button1_Click(object sender, EventArgs e)



{
 
Server.Transfer("WebForm2.aspx");



}
 
class Word



{
 
public string Job { get; set; }

public string FirstName { get; set; }

public string LastName { get; set; }

public string UserName { get; set; }



}
 
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)



{
 
XDocument doc = XDocument.Load(Server.MapPath("XMLFile1.xml"));

XElement lex = doc.Element("users");

Word[] catWords = null;

if (lex != null)



{
 
IEnumerable<XElement> words = lex.Elements("user");

catWords = (from itm in words

where

itm.Element("FirstName") != null

&& itm.Element("LastName") != null

&& itm.Element("UserName") != null

&& itm.Element("Job").Value==DropDownList3.SelectedItem.ToString()

select new Word()



{
 
FirstName = itm.Element("FirstName").Value,

LastName = itm.Element("LastName").Value,

UserName = itm.Element("UserName").Value,

Job = itm.Element("Job").Value

}).ToArray<Word>();



}
 
//print it

if (catWords != null)



{
 
XmlDocument xdoc = new XmlDocument();

XmlElement mprntelmt = xdoc.CreateElement("users");

XmlElement rprntelmt = xdoc.CreateElement("users");

XmlElement prntelmt = xdoc.CreateElement("user"); ;

foreach (Word itm in catWords)



{
 
prntelmt = xdoc.CreateElement("user");

XmlElement fname = xdoc.CreateElement("FirstName");



fname.InnerText = itm.FirstName;
 
XmlElement lname = xdoc.CreateElement("LastName");



lname.InnerText = itm.LastName;
 
XmlElement uname = xdoc.CreateElement("UserName");



uname.InnerText = itm.UserName;
 
XmlElement job = xdoc.CreateElement("Job");



job.InnerText = itm.Job;

prntelmt.AppendChild(fname);

prntelmt.AppendChild(lname);

prntelmt.AppendChild(uname);

prntelmt.AppendChild(job);

rprntelmt.AppendChild(prntelmt);

}

mprntelmt.AppendChild(rprntelmt);
 
string msg = mprntelmt.InnerXml;

StringReader stringReader = new StringReader(msg);

ds = new DataSet();



ds.ReadXml(stringReader);

GridView2.DataSource = ds;

GridView2.DataBind();

}



}
 
//protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)

//{

// FillGrid(Convert.ToInt32(DropDownList2.SelectedValue.ToString()));

//}



}

}
 
webform2

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication2.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:Label ID="Label1" runat="server" Text="First Name"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

</br>

<asp:Label ID="Label2" runat="server" Text="Last Name"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>

</br>

<asp:Label ID="Label3" runat="server" Text="User Name"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>

</br>

<asp:Label ID="Label4" runat="server" Text="Job"></asp:Label>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>

</br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Submit" />

</div>

</form>

</body>

</html>

webform2.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Xml;

namespace WebApplication2



{
 
public partial class WebForm2 : System.Web.UI.Page



{
 
protected void Page_Load(object sender, EventArgs e)



{

}
 
protected void Button1_Click(object sender, EventArgs e)



{
 
XmlDocument xdoc = new XmlDocument();

xdoc.Load(Server.MapPath("XMLFile1.xml"));

XmlElement prntelmt = xdoc.CreateElement("user");

XmlElement fname = xdoc.CreateElement("FirstName");



fname.InnerText = TextBox1.Text;
 
XmlElement lname = xdoc.CreateElement("LastName");



lname.InnerText = TextBox2.Text;
 
XmlElement uname = xdoc.CreateElement("UserName");



uname.InnerText = TextBox3.Text;
 
XmlElement job = xdoc.CreateElement("Job");



job.InnerText = TextBox4.Text;

prntelmt.AppendChild(fname);

prntelmt.AppendChild(lname);

prntelmt.AppendChild(uname);

prntelmt.AppendChild(job);

xdoc.DocumentElement.AppendChild(prntelmt);
 
xdoc.Save(Server.MapPath("XMLFile1.xml"));

Server.Transfer("WebForm1.aspx");



}

}

}

output