• Home
  • Forum
  • Terms and Privacy
17ebook! free ebooks! free download!
Complete online surveys and earn cash from GlobalTestMarket


Search here...
     

Your application will be embedded into SharePoint Asp.NET book review

Posted by admin 28 October, 2010

Get your FREE Diabetes Recipes eBook!Your application will be embedded into SharePoint Asp.NET book review

Why should Asp.net application embedded into SharePoint? We do not discuss this! We will be discussing is how the application will be embedded in Asp.net SharePoint, and which may be encountered.
Text start:
Here is to create a Web application which has a Demo.aspx page, the code is as follows:
namespace WebInMOSS
{
public partial class _Demo: System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e)
{
Response.Write (“Web Can In Moss”);

}

}
}
Compile this program to generate a WebInMOSS.dll file copy this dll to the bin folder under the web directory, add nodes:

And then into the MOSS in Demo.aspx page. Into the way you can choose to use the SPD, or simply upload a document library. Us into the “Pages” in.
In MOSS browse pages / Demo.aspx,

Whether to delete autoeventwireup can it? Indeed, deletion AutoEventWireup = “true” after the
Page displays the Web Can In Moss, proof of successful execution.
Increase the complexity of web applications, in Demo.aspx into a button, its event as follows:
protected void Button3_Click (object sender, EventArgs e)
{
SPSite siteCollection = new SPSite (“http://xuwei:8080/”);

SPWeb site = siteCollection.OpenWeb (“/ Docs /”);

SPList list = site.Lists ["notice"];

SPListItemCollection items = list.Items;

foreach (SPListItem item in items)
{

Response.Write (“
“);
Response.Write (item ["Title"]. ToString ());

}

}
Debugging in VS2005 the outcome (please ignore the write session you spectators and read session 2 个 button):

The program will be re-compiled dll, Demo.aspx in by the front way into the MOSS. Browse again

At this point the incident can not be used Onclick appeared, what to do? We must start the MOSS security model can be implemented server-side events. Operation is as follows:
We find the Web.config file node in
Node to add a virtual path
Statement This site allows all the files under the server-side event, of course, you can develop a virtual directory is the folder, but this value must be ~ / or / at the beginning, and the file name or * must end.
Save Demo.aspx and view the page, to display properly, click listobject button (please ignore the write session you spectators and read session 2 个 button), OK, normal execution shows!

Further increase the complexity of web applications, add Session, (in the MOSS development to take that way regardless, as long as the procedures and their integration, there will always encounter Session of the problem).
Code:
protected void Button1_Click (object sender, EventArgs e)
{
Session ["Count"] = “1″;
}

protected void Button2_Click (object sender, EventArgs e)
{
if (Session ["Count"]! = null)
{
Response.Write (“
” Session ["Count"]. ToString () ““);
}
}
Save compilation browser page again, click listobject button to display the results correctly, but when you click Write Session occurs when

This prompted domineering enough! Who knows what unexpected error! I tried to modify the to MOSS display an error message, but failed. Log files do not look
Find out what trail, but fortunately, is expected to start Session may be problems, check the Web.config found

Oh, Session default is turned off, of course, not run properly. Set it to true and save. View demo.aspx page, click write session and read Session, the normal execution.
Some important issues can finally solved! If we encounter other problems, we continue the discussion!

Categories : book review Tags :

Comments

No comments yet.


Sorry, the comment form is closed at this time.

Subscribe via Email


Windows Touch Technics and Technology tablet Solution Manual Smart Security/Hacking Science Related Science/Engineering samsung Review Programming Phones phone Nokia Newspapers netbooks Netbook Mobile Medical/Medicine Laptops Laptop IT Certification Iphone Hobbies Health Graphics and Design Google Game For Women For Men features Ericsson Encyclopedias Economics and Finances Economics/Business deals DB Consumer Electronics Computer Related Computer Comics Apple android about
  • Categories

    • book review
    • Ebook Download
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Archives

    • May 2013
    • April 2013
    • March 2013
    • February 2013
    • January 2013
    • December 2012
    • November 2012
    • October 2012
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • May 2011
    • April 2011
    • March 2011
    • February 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
  • Recent posts

    • HTC Sensation Deals ? Unearth The Best Cost-Effective Deal
    • Forthcoming Nokia Cell Phones
    • Brighten the Appearance of Your Home, As Well As Your Mood, With Professional Window Cleaning
    • What Should Form the Basis to Compare Mobile Phones?
    • HTC Touch Diamond2 to be Favored-myluxphone
    • Nokia Launching Lumia WP8 Devices As a Gift Before Malaysia Day
    • Producing The Brand New Hd7 Cell Phone
    • Trail Rides, Cell Phones and ID
    • Nokia Lumia 900 With Amazingly Fast Way to Connect
    • Sony Ericsson Live With Walkman Smartphone

Copyright © 2013 17ebook! free ebooks! free download! All right reserved

  • Home
  • Forum
  • Terms and Privacy