On September 27th Microsoft released Windows Sharepoint Services service pack 2.0.
You can download it from the following link:
Windows SharePoint Services Service Pack 2 (SP2): "
Windows SharePoint Services Service Pack 2 (SP2) contains stability and performance improvements. Some of the fixes included with SP2 have been previously released as separate updates. This service pack combines them into one update.(source MSDN)
Along with other noteworthy updates and fixes WSS SP 2.0 now supports SQL Server 2005 and ASP.NET 2.0 as well.
For more detailed information please visit Microsoft Support sites KB article here
Friday, September 30, 2005
Wednesday, September 28, 2005
A must read: "'You've got to find what you love,"
I simply loved every bit of it. Its such a gr8 read read that I couldnt help but share it with you all.
Steve Jobs Address to Standford University Graduates on June 2005
We all ought to "Stay Hungry and Foolish"
Steve Jobs Address to Standford University Graduates on June 2005
We all ought to "Stay Hungry and Foolish"
Tuesday, September 27, 2005
Understanding "The Laws of Identity"
A must read at MSDN for any one whos planning to get into Windows Vista Development i.e. The Next Generation of .NET Application Platform.
WinFX Developer Center: InfoCard: The Laws of Identity
WinFX Developer Center: InfoCard: The Laws of Identity
WinFX Developer Center: An empty overview section
I was just skimming through WinFx Developer Center at MSDN and clicked overview link available in left navigation menu. And to my amazement i found an empty section, not a single line containing overview information on "WinFX". I am reporting this at MVP support site. Lets see when do we get to see overview of WinFX.
Fab Labs, Personal Fabrications and MIT...
I came across this awesome read at BBC. I thought you might want to read it out.
Of all the cool, futuristic machines featured on the television series Star Trek, the 'replicator' was certainly one of the most useful.
Of all the cool, futuristic machines featured on the television series Star Trek, the 'replicator' was certainly one of the most useful.
Friday, September 16, 2005
Cross Page Postback Techniques : Comparing ASP.NET 1.X and 2.0
In an every day life of ASP.NET programmer there are number of occassions when he/she would want to postback a page to some other target page. And then from target page he/she would like to fetch information from source page (the page that triggered the postback). With ASP.Net 1.x this was only possible thrgouh Server.Transfer (that keeps the state of posted page). And then on the target one would always use Context.Handler and type cast it into the page that orginated this request (i.e.source page) .
Following is a code snippet that shows how calling server.transfer transfers state of source page to the target page.
Source page (WebForm1.aspx)
Server.Transfer("WebForm2.aspx"); // Transfer to target page URL
Target page (WebForm2.aspx)
// variable to hold webform1 instance
private WebForm1 previousPage;
// type casting it
if(Context.Handler != null && Context.Handler is WebForm1)
{
previousPage = (WebForm1) Context.Handler;
}
And then through previousPage reference one can access properties that were exposed on that page. Like if “SpookyValue” was some public proprty in “WebForm1” class then you could access it easily like “previousPage.SpookyValue”.
But to be able to do this all we needed to use “Server.Transfer”. With Response.Redirect all state information is lost. However with ASP.NET 2.0 we do have postbackURL property that comes in handy when we are talking about cross page PostBacks. Just by specifying “PostBackUrl” we can easily transfer the state of one page to the other page.
this.btnPostBack.PostBackUrl = "~/Default2.aspx";
On the receieving end of this postback, we can easily retrieve the page refrence that initiated this postback. This could be done using “PreviousPage” property. Following is code snippet that does the same:
if (this.PreviousPage != null && this.PreviousPage.IsCrossPagePostBack)
{
this.txtDetails.Text = "This is a cross Page Post Back and the source page is " + this.PreviousPage.ID;
this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.PreviousPage).Comments;
this.txtDetails.Text += "Value = " + ((_Default)this.PreviousPage).Value;
}
--------------------------------------------------------------------------------
Code for ASP.NET 1.X (WebForm2.aspx.cs)
--------------------------------------------------------------------------------
29: private void Page_Load(object sender, System.EventArgs e)
30: {
31: //this.Request.p
32: if(Context.Handler != null && Context.Handler is WebForm1)
33: {
34: previousPage = (WebForm1) Context.Handler;
35: }
36:
37: // Put user code to initialize the page here
38: ShowStateInformation();
39:
40: }
41:
64: /// Shows state information
65: ///
66: private void ShowStateInformation()
67: {
68: lblStateInformation.Text = "View State Informaiton goes like : " ;
69: IEnumerator viewStateEnum = this.ViewState.Keys.GetEnumerator();
70:
71: while(viewStateEnum.MoveNext() )
72: {
73: lblStateInformation.Text += "Viewstate Key = "+viewStateEnum.Current.ToString()+" and Value = "+this.ViewState[viewStateEnum.Current.ToString()].ToString()+" ";
74: }
75:
76: if(previousPage != null)
77: lblStateInformation.Text = "Spooky Info goes like "+previousPage.SpookyValue;
78: else
79: lblStateInformation.Text = "No state information available ";
80: }
81:
82: }
83: }
--------------------------------------------------------------------------------
Code for ASP.NET 1.X (WebForm1.aspx.cs)
--------------------------------------------------------------------------------
25: private string someSpookyVariable;
26:
27: public string SpookyValue
28: {
29: get
30: {
31: return this.someSpookyVariable;
32: }
33: }
34:
35:
36: private void Page_Load(object sender, System.EventArgs e)
37: {
38: if( this.ViewState["spookyStateKey"] != null)
39: {
40: Response.Write(" I have a spooky state variable "+this.ViewState["spookyStateKey"].ToString());
41: }
42: // Put user code to initialize the page here
43: ShowStateInformation();
44: }
45:
60: private void InitializeComponent()
61: {
62: this.btnRedirect.Click += new System.EventHandler(this.btnRedirect_Click);
63: this.Load += new System.EventHandler(this.Page_Load);
64:
65: htmlHiddenInfo = new HtmlInputHidden();
66: htmlHiddenInfo.ID="HiddenId";
67: htmlHiddenInfo.Name="HiddenName";
68: htmlHiddenInfo.Value="HiddenValue";
69: this.Controls.Add(htmlHiddenInfo);
70:
71: this.someSpookyVariable = "I am a spooky value that might be read from some other page!";
72:
73: }
79: private void ShowStateInformation()
80: {
81: lblStateInformation.Text = "View State Informaiton goes like : " ;
82: IEnumerator viewStateEnum = this.ViewState.Keys.GetEnumerator();
83: while(viewStateEnum.MoveNext() )
84: {
85: lblStateInformation.Text += "Viewstate Key = "+viewStateEnum.Current.ToString()+" and Value = "+this.ViewState[viewStateEnum.Current.ToString()].ToString()+" ";
86: }
87:
88: lblStateInformation.Text += "Hidden Var Info goes like : " ;
89: lblStateInformation.Text += "Name = "+htmlHiddenInfo.Name+" Id = "+htmlHiddenInfo.ID+" Value = "+htmlHiddenInfo.Value;
90: }
91:
92: private void btnRedirect_Click(object sender, System.EventArgs e)
93: {
94: if(this.ViewState["spookyStateKey"] == null)
95: {
96: this.ViewState.Add("spookyStateKey","spookyStateValue");
97: }
98:
99: Server.Transfer("WebForm2.aspx");
100:
101: }
102: }
103: }
--------------------------------------------------------------------------------
Code for ASP.NET 2.0 (_Default.aspx.cs)
--------------------------------------------------------------------------------
11: public partial class _Default : System.Web.UI.Page
12: {
13: ///
14: /// Comments to be exposed on the post back
15: ///
16: public string Comments
17: {
18: get
19: {
20: return this.txtComment.Text;
21: }
22: }
23:
24: ///
25: /// Value to be exposed on post back
26: ///
27: public string Value
28: {
29: get
30: {
31: return this.cmbValues.Text;
32: }
33: }
34:
39: protected void btnPostBack_Click(object sender, EventArgs e)
40: {
41: this.btnPostBack.PostBackUrl = "~/Default2.aspx";
42: }
43: protected void btnServerTransfer_Click(object sender, EventArgs e)
44: {
45: Server.Transfer("Default2.aspx");
46: }
47: protected void Button1_Click(object sender, EventArgs e)
48: {
49: Response.Redirect("Default2.aspx");
50: }
51: }
--------------------------------------------------------------------------------Code for ASP.NET 2.0 (Default2.aspx.cs)--------------------------------------------------------------------------------
1: protected void Page_Load(object sender, EventArgs e)
2: {
3: if (this.PreviousPage != null && this.PreviousPage.IsCrossPagePostBack)
4: {
5: this.txtDetails.Text = "This is a cross Page Post Back and the source page is " + this.PreviousPage.ID;
6: this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.PreviousPage).Comments;
7: this.txtDetails.Text += "Value = " + ((_Default)this.PreviousPage).Value;
8: }
9: else
10: {
11: if ( (this.Context.Handler != null) && (this.Context.Handler is _Default) )
12: {
13: this.txtDetails.Text = "This was a Server.Transfer Request";
14: this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.Context.Handler).Comments;
15: this.txtDetails.Text += "Value = " + ((_Default)this.Context.Handler).Value;
16: }
17: else
18: {
19: this.txtDetails.Text = "This was a Response.Redirect Request. No state available for calling page!";
20: }
21: }
22: }
--
Hammad Rajjoub,
Microsoft MVP (Most Valuable Professional),
Windows Server Systems: XML Web Services
Member Speakers Bureau,
Chairman UG Relations Committe,
INETA MEA.(http://mea.ineta.org)
Blog: http://dotnetwizards.blogspot.com
Following is a code snippet that shows how calling server.transfer transfers state of source page to the target page.
Source page (WebForm1.aspx)
Server.Transfer("WebForm2.aspx"); // Transfer to target page URL
Target page (WebForm2.aspx)
// variable to hold webform1 instance
private WebForm1 previousPage;
// type casting it
if(Context.Handler != null && Context.Handler is WebForm1)
{
previousPage = (WebForm1) Context.Handler;
}
And then through previousPage reference one can access properties that were exposed on that page. Like if “SpookyValue” was some public proprty in “WebForm1” class then you could access it easily like “previousPage.SpookyValue”.
But to be able to do this all we needed to use “Server.Transfer”. With Response.Redirect all state information is lost. However with ASP.NET 2.0 we do have postbackURL property that comes in handy when we are talking about cross page PostBacks. Just by specifying “PostBackUrl” we can easily transfer the state of one page to the other page.
this.btnPostBack.PostBackUrl = "~/Default2.aspx";
On the receieving end of this postback, we can easily retrieve the page refrence that initiated this postback. This could be done using “PreviousPage” property. Following is code snippet that does the same:
if (this.PreviousPage != null && this.PreviousPage.IsCrossPagePostBack)
{
this.txtDetails.Text = "This is a cross Page Post Back and the source page is " + this.PreviousPage.ID;
this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.PreviousPage).Comments;
this.txtDetails.Text += "Value = " + ((_Default)this.PreviousPage).Value;
}
--------------------------------------------------------------------------------
Code for ASP.NET 1.X (WebForm2.aspx.cs)
--------------------------------------------------------------------------------
29: private void Page_Load(object sender, System.EventArgs e)
30: {
31: //this.Request.p
32: if(Context.Handler != null && Context.Handler is WebForm1)
33: {
34: previousPage = (WebForm1) Context.Handler;
35: }
36:
37: // Put user code to initialize the page here
38: ShowStateInformation();
39:
40: }
41:
64: /// Shows state information
65: ///
66: private void ShowStateInformation()
67: {
68: lblStateInformation.Text = "View State Informaiton goes like : " ;
69: IEnumerator viewStateEnum = this.ViewState.Keys.GetEnumerator();
70:
71: while(viewStateEnum.MoveNext() )
72: {
73: lblStateInformation.Text += "Viewstate Key = "+viewStateEnum.Current.ToString()+" and Value = "+this.ViewState[viewStateEnum.Current.ToString()].ToString()+" ";
74: }
75:
76: if(previousPage != null)
77: lblStateInformation.Text = "Spooky Info goes like "+previousPage.SpookyValue;
78: else
79: lblStateInformation.Text = "No state information available ";
80: }
81:
82: }
83: }
--------------------------------------------------------------------------------
Code for ASP.NET 1.X (WebForm1.aspx.cs)
--------------------------------------------------------------------------------
25: private string someSpookyVariable;
26:
27: public string SpookyValue
28: {
29: get
30: {
31: return this.someSpookyVariable;
32: }
33: }
34:
35:
36: private void Page_Load(object sender, System.EventArgs e)
37: {
38: if( this.ViewState["spookyStateKey"] != null)
39: {
40: Response.Write(" I have a spooky state variable "+this.ViewState["spookyStateKey"].ToString());
41: }
42: // Put user code to initialize the page here
43: ShowStateInformation();
44: }
45:
60: private void InitializeComponent()
61: {
62: this.btnRedirect.Click += new System.EventHandler(this.btnRedirect_Click);
63: this.Load += new System.EventHandler(this.Page_Load);
64:
65: htmlHiddenInfo = new HtmlInputHidden();
66: htmlHiddenInfo.ID="HiddenId";
67: htmlHiddenInfo.Name="HiddenName";
68: htmlHiddenInfo.Value="HiddenValue";
69: this.Controls.Add(htmlHiddenInfo);
70:
71: this.someSpookyVariable = "I am a spooky value that might be read from some other page!";
72:
73: }
79: private void ShowStateInformation()
80: {
81: lblStateInformation.Text = "View State Informaiton goes like : " ;
82: IEnumerator viewStateEnum = this.ViewState.Keys.GetEnumerator();
83: while(viewStateEnum.MoveNext() )
84: {
85: lblStateInformation.Text += "Viewstate Key = "+viewStateEnum.Current.ToString()+" and Value = "+this.ViewState[viewStateEnum.Current.ToString()].ToString()+" ";
86: }
87:
88: lblStateInformation.Text += "Hidden Var Info goes like : " ;
89: lblStateInformation.Text += "Name = "+htmlHiddenInfo.Name+" Id = "+htmlHiddenInfo.ID+" Value = "+htmlHiddenInfo.Value;
90: }
91:
92: private void btnRedirect_Click(object sender, System.EventArgs e)
93: {
94: if(this.ViewState["spookyStateKey"] == null)
95: {
96: this.ViewState.Add("spookyStateKey","spookyStateValue");
97: }
98:
99: Server.Transfer("WebForm2.aspx");
100:
101: }
102: }
103: }
--------------------------------------------------------------------------------
Code for ASP.NET 2.0 (_Default.aspx.cs)
--------------------------------------------------------------------------------
11: public partial class _Default : System.Web.UI.Page
12: {
13: ///
14: /// Comments to be exposed on the post back
15: ///
16: public string Comments
17: {
18: get
19: {
20: return this.txtComment.Text;
21: }
22: }
23:
24: ///
25: /// Value to be exposed on post back
26: ///
27: public string Value
28: {
29: get
30: {
31: return this.cmbValues.Text;
32: }
33: }
34:
39: protected void btnPostBack_Click(object sender, EventArgs e)
40: {
41: this.btnPostBack.PostBackUrl = "~/Default2.aspx";
42: }
43: protected void btnServerTransfer_Click(object sender, EventArgs e)
44: {
45: Server.Transfer("Default2.aspx");
46: }
47: protected void Button1_Click(object sender, EventArgs e)
48: {
49: Response.Redirect("Default2.aspx");
50: }
51: }
--------------------------------------------------------------------------------Code for ASP.NET 2.0 (Default2.aspx.cs)--------------------------------------------------------------------------------
1: protected void Page_Load(object sender, EventArgs e)
2: {
3: if (this.PreviousPage != null && this.PreviousPage.IsCrossPagePostBack)
4: {
5: this.txtDetails.Text = "This is a cross Page Post Back and the source page is " + this.PreviousPage.ID;
6: this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.PreviousPage).Comments;
7: this.txtDetails.Text += "Value = " + ((_Default)this.PreviousPage).Value;
8: }
9: else
10: {
11: if ( (this.Context.Handler != null) && (this.Context.Handler is _Default) )
12: {
13: this.txtDetails.Text = "This was a Server.Transfer Request";
14: this.txtDetails.Text += "Variables available at previous page: Comments = " + ((_Default)this.Context.Handler).Comments;
15: this.txtDetails.Text += "Value = " + ((_Default)this.Context.Handler).Value;
16: }
17: else
18: {
19: this.txtDetails.Text = "This was a Response.Redirect Request. No state available for calling page!";
20: }
21: }
22: }
--
Hammad Rajjoub,
Microsoft MVP (Most Valuable Professional),
Windows Server Systems: XML Web Services
Member Speakers Bureau,
Chairman UG Relations Committe,
INETA MEA.(http://mea.ineta.org)
Blog: http://dotnetwizards.blogspot.com
Friday, September 09, 2005
Viewing Office Thumbnails in Sharepoint
Who would mind veiwing Microsoft Office Document thumbnail view in Sharepoint. The thumbnail view is all too important when it comes to browsing a large document library specially when you are looking for documents with (visually) distinguished contents.
Following is a link to an article published at MSDN that talks about developing a web part that would preview document thumbnails in sharepoint.
Microsoft Office Thumbnails in SharePoint
Following is a link to an article published at MSDN that talks about developing a web part that would preview document thumbnails in sharepoint.
Microsoft Office Thumbnails in SharePoint
Saturday, September 03, 2005
MSDN TV Episode talks about "Data Access in ASP.NET 2.0"
MSDN TV: Data Access in ASP.NET 2.0:
Data Access in ASP.NET 2.0
Bradley Millington shows how to build a data-driven Web site in ASP.NET 2.0 and Visual Studio 2005. Learn how to build a database from scratch using Visual Studio built-in support for SQL Server 2005 Express, then retrieve and render the database contents using the new data controls in ASP.NET.
Subscribe to:
Posts (Atom)


