Monday, August 30, 2010

How to implement Silverlight application and deploy it on Sharepoint 2010 server

Step I

-Open Visual Studio 2010

-File-->New-->Project

-It displays the Project menus,Then On Left hand side shows Recent Template give below that shows installed Templates Now you have to select Silverlight Project --> Select Silverlight Application On Right Side-->Give Proper Application Name to this.


-Now after that shows the one pop up window.In the pop up window New Project Name option it shows YourApplicationName.Web keep this as it is,Next New Web Project type:Select ASP.NET Web Application Project, After that in Silverlight Version :Select Silverlight 3.Click OK






On the Design Portion drag and drop the controls fron tollbox.






-Double Click on Button it displays the .cs file (code File)


Type The Following code on it

private void button1_Click(object sender, RoutedEventArgs e)
{
if(textBox1.Text!="")
MessageBox.Show(textBox1.Text );
}




-Build the solution-->Go to Project Directory Where your Silverlight Application located-->Double click SilverlightApplication1.Web Folder-->Double Click ClientBin Folder

in side this Folder We Shows the SilverlightApplication.xap File(.Xap).Copy it on your Desktop.


-Now open your Sharepoint 2010 site.Open the Library-->open Shared Document-->Upload .Xap File on this library.


-Right Click on the uplaoded File-->Properties-->copy the Address(URL) of your File.

-Go to the Add New WebPart-->select Media And content-->Click Silverlight WebPart-->Click Add

-It will display pop up window You should paste the URL that are located the .Xap file in you Shared documents.



-Click ok



-And Finally it will display the silverlight WebPart.

How to implement Silverlight application and deploy it on Sharepoint 2010 server

Step I
-Open Visual Studio 2010
-File-->New-->Project
-It displays the Project menus,Then On Left hand side shows Recent Template give below that shows installed Templates Now you have to select Silverlight Project --> Select Silverlight Application On Right Side-->Give Proper Application Name to this.



-Now after that shows the one pop up window.In the pop up window New Project Name option it shows YourApplicationName.Web keep this as it is,Next New Web Project type:Select ASP.NET Web Application Project, After that in Silverlight Version :Select Silverlight 3.Click OK




On the Design Portion drag and drop the controls fron tollbox.




-Double Click on Button it displays the .cs file (code File)

Type The Following code on it
private void button1_Click(object sender, RoutedEventArgs e)
{
if(textBox1.Text!="")
MessageBox.Show(textBox1.Text );
}

-Build the solution-->Go to Project Directory Where your Silverlight Application located-->Double click SilverlightApplication1.Web Folder-->Double Click ClientBin Folder

in side this Folder We Shows the SilverlightApplication.xap File(.Xap).Copy it on your Desktop.

-Now open your Sharepoint 2010 site.Open the Library-->open Shared Document-->Upload .Xap File on this library.



-Right Click on the uplaoded File-->Properties-->copy the Address(URL) of your File.
-Go to the Add New WebPart-->select Media And content-->Click Silverlight WebPart-->Click Add
-It will display pop up window You should paste the URL that are located the .Xap file in you Shared documents.




-Click ok
-And Finally it will display the silverlight WebPart.