.Net Pakistan

A platform for .Net Evangelists, where they can indulge their passion with .Net

Thursday, July 06, 2006

An excellent WhitePaper about ! SharePoint Backup & Restore

An excellent document about Sharepoint Backup & Restore for single, medium, large server farms.

It not only documentated the data backup part, but also taking the backup of IIS meta data, portal site configuration, everything you can think!

Click here to read
http://www.microsoft.com/technet/prodtechnol/sppt/reskit/c2861881x.mspx

Regards,
Wajahat Abbas

Friday, May 05, 2006

Programming in Native Language

Though i spoke about this trend, and advancement of programming languages especially in Software Development, one of my friend forwarded me a link which surprised me.

Click here to go,
https://www.osmosian.com/

Does programmers should feel a threat from this ? If not , how they can transform themselve for next ages?


Wajahat Abbas




www.dotNetPakistan.com

Wednesday, December 21, 2005

InfoCard in WCF (Windows Communication Foundation)

I came across this very interesting guide by Microsoft on Integrating with InfoCard v1.0 posted at MSDN webservice section. As you all know by now that WCF is a part of the upcoming Windows API named WINFX and will be playing a center part as providing the foundation for communication needs of our next generation of applications. Those who have already downloaded the Beta 2 version of WinFX will be able to play with this new piece of technology. Basically InfoCard will provide users to manage their identity from various identity providers, who are at this point unknows, atleast to me. No matter wheter they will be third part identity providers or Microsoft itself, I think it is a great move to provide security for the end application to communicate with trusted applications only.

The foundation of this model (InfoCard) is based on WS-Trust, WS-Security Policy and WS-Metadata Exchange web service specifications. We will be able to see a root-of-trust policy between applications before they start communicating with each other, eliminating all posiblity of sending crucial data to wrong hands or I should perhaps say, applications.

The guide also contains a very interesting example of utilizing this service and how this model can be used to provide security for the end users. WCF is going to serve as a very strong foundation in providing the communicaton standards, but I hope they dont put up heavy charges of utilizing such services.

Read the complete guide here.

Wednesday, November 30, 2005

Web Standards and ASP.NET 2.0

While making websites using ASP.NET, a developer always have to decide either his site will be following all W3C standards or he is just another IE fan. Well following standards is no more a problem as Microsoft has a nice article for all of us on "Building ASP.NET 2.0 Web Sites using Web Standards." It is a very comprehensive article covering all aspects of cross browser compatibility with code samples as well. A must read for every web developer.

Click here to read the article.

Branding a SharePoint Portal Site

Before Office 12 gonna redesign the new world, just get to know what will become PAST..

A very cool, appropriate article about branding sharepoint portal. Its for SharePoint 2003.

Click here to get it


Regards,
Wajahat Abbas


www.dotNetPakistan.com

Tuesday, November 29, 2005

TextAlign Property of Windows.Form.Label Control

I was just to hit my head after strucking my hands in this buggy thing. What i want is proper alignment for Label control for English & Arabic, i am working on a mutlilingual C# desktop applicaiton.

I tries a lot to manage it with by setting the property like

this.lblFirstName.TextAlign = System.Drawing.ContentAlignment.TopRight ;

But i didnt get the results, then i realize the buggy thing which is not allowing it to align is that AutoSize property of a label. If you make a control autosize = true, it wont allow you to align this.

After getting it autosize false, it works fine......

Simple thing, but tricky, and even not mentioned in sites....forums..

Regards,
Wajahat Abbas
http://www.wajahatabbas.com
http://www.dotnetpakistan.com




www.dotNetPakistan.com

SQL Server 2000 Case ("COLLATION") problem

The problem that i was facing was with the case sensitiveness of SQL Server.
A default SQL Server installation is case insensitive, which means that SQL Server will not differentiate between upper and lower case characters/letters. That is, "Oracle" is the same as "ORACLE" or "oracle". But when it starts to differentiate, then its a very big problem.
The case problem now is callaed "COLLATION".

The steps to make things rite, do the following.

How to rebuild the master database (Rebuild Master utility)
To rebuild the master database

Shutdown Microsoft� SQL Server? 2000, and then run Rebuildm.exe. This is located in the Program Files\Microsoft SQL Server\80\Tools\Binn directory.


In the Rebuild Master dialog box, click Browse.


In the Browse for Folder dialog box, select the \Data folder on the SQL Server 2000 compact disc or in the shared network directory from which SQL Server 2000 was installed, and then click OK.


Click Settings. In the Collation Settings dialog box, verify or change settings used for the master database and all other databases.
Initially, the default collation settings are shown, but these may not match the collation selected during setup. You can select the same settings used during setup or select new collation settings. When done, click OK.

In the Rebuild Master dialog box, click Rebuild to start the process.
The Rebuild Master utility reinstalls the master database.

Thursday, November 17, 2005

Office 12 IS OUT -- BETA 1 Ships

Saturday, November 12, 2005

Upcoming Technologies on Microsoft.Net Development Platform: Part I

Check out my new article on second generation of .NET platform available at Longhorn Corner. I'd be happy to hear back from you.

Hammad Rajjoub

Tuesday, November 08, 2005

Ready to Rock: Visual Studio 2005, SQL Server 2005 and BizTalk 2006

Visual Studio 2005, SQL Server 2005 and BizTalk Server 2006 are officially launched. In his keynote speech at the launch, Microsoft CEO, Steve Ballmer shares some facts about the products, then Prashant Sridharan gives exciting demos of BizTalk Server 2006 and its integration with SQL Server 2005 along with an awesome demo of "Office 12".

Later on Brian Goldfarb along with his fellow developer, shows demo of Visual Web Developer Express edition and Club website Starter Kit in action.

Watch the full Launch event!

Friday, October 28, 2005

Does Visual Studio Rot the Mind?

Charlez Petzold had an amazing speech at NYC.NET Developers Groups on the state of programming in the Microsoft World. A must read for every developer and thanks to Bill Evjen for pointing it out on his blog.

Read it here.

Saturday, October 22, 2005

Microsoft Pakistan's Touchdown Program for VS 2005/SQL Server 2005

These days I am conducting trainings as a part of "Microsoft Touchdown " for VS 2005 (Whidbey) and SQL Server 2005 (Yukon) Launch program. These trainings are being conducted by Microsoft Pakistan at a training fascility provided by Kalsoft's KalAcademy. Participants have been invited from Microsoft ISV partners. I am conducting these sessions on the behalf of Kalsoft which happens to be employer and Microsoft's Gold Certified Partner.

Yesterday I conducted two sessions. One on SQL Server 2005's Web Service Support and second one on SQL Server 2005's Service Broker Architecture.
As this is a month of Ramadhan, it was very difficult to speak for whole day while fasting and that on as sunny and hot day as it was yesterday. I believe sessions went well as I gave hands on demo on web service development and client accessibility and i believe audience liked it pretty much. The best part was that amongst participants/attendees were a couple of my friends, a relative and an old time trusted comrade and MVP Adnan Farooq. I have got more sessions comming up for next week.

This all buildup is going to help me and INETA a lot in prepapring for VS/SQL Server 2005 Launch.

posted by:
Hammad Rajjoub

Tuesday, October 18, 2005

How to become a Microsoft Most Valuable Professional (MVP) ?

Recently I recieved an e-mail asking about "How to become an MVP?" on one of the technical groups that I am subscribed on. I felt oblijed to respond to these questions and following is my response. (Feel free to comment!)

You are not the first one to ask these question and definately not the last one either. I believe its natural ask these questions and i will be really happy if my answers can help you understand things better.

So here goes my response to your queries .. but ...one be one!

1) First of all can any one tell me that what and who is a MVP,what type of people are awarded MVPs by Microsoft I mean to say that what profesisonal qualities and skills does these people have.

Microsoft’s Most Valuable Professional (MVP) is an individual whom Microsoft recognizes for his community participation and willingness to help others. MVP is an individual who provide invaluable online and offline expertise to the technical community in a specific or a group of Microsoft Technology areas.

So as for the best of my understandings MVP program is all about identifying people in technical community who are active participants and are always willing to share their experiences and knowledge, pertaining to particular technology area (like C# , ASP.NET or XML Web Services etc), with other developers in the community.


2)2) My second question is that how to become a MVP, do we have to pass some kind of Test or some certification like MCSD.net/MCP/MCAD.net etc , I think that we have to prove our skills in any one of the Microsoft Technologies fo eg C#,SQL Server etc but what is the crieteria of Microsoft for which it accepts that some person is really expert in one of the technologies I mean to say that how does Microsoft judges the skills of a person for some technology,do we have to develop some world class Software or any other product but again what is the Microsoft's defination for a world class Software .


My answer is No!. You don’t require any certifications or such credentials, you need not to have worked on any world class software etc. But the point is you need to have expert level skills in some Microsoft technology area. Believe me that area could be any thing from MS Word to BizTalk Server, i.e. any thing. But remember doing certifications, working on development of great software can always help you become a guru!

Now the second part of your question was how does Microsoft judge some one's skills? Now there are multiple channels where Microsoft can get to know about such individuals (aspiring/would be MVPs), one place where Microsoft is carefully observing techies is msdn newsgroups (http://msdn.microsoft.com/newsgroups/) another very important platform where Microsoft looks for such individuals is INETA User Groups (http://www.ineta.org), and then there are other places like blogs, mailing lists etc.


3) The third and last question is that what benefits one gets by becoming an MVP,does he gets some kind of financial benefits or ny other such benefits and if not than whats the use of becoming a MVP?

Well, MVP is an award its not a designation so there aren’t any financial or such benefits associated with it. Being an MVP within itself is a great achievement and I am sure not a single MVP looks for financial aspects or such gains while becoming MVP.
Becoming an MVP is the biggest benefit within itself i.e. if you understand.

However there are certain other benefits associated with MVP program as well. Following is a brief introduction to them:

A) Technical Resources·
MVP Source Licensing Program enables eligible MVPs to gain access to Microsoft source code.
· MVP Academy virtual learning center delivers timely instructor-led online courses that help Microsoft MVPs realize their full potential.
· Downloads host key documents and files on the MVP Member’s Web site so Microsoft can securely distribute information to MVPs on the MVP Members (Web) Site.
· Microsoft Learning Opportunities offers resources, skills assessments, books, online reference materials, course, workshops and certification programs.
· Knowledge Base Resources give MVPs opportunities to get articles published, view articles on pre-release products and issues, and rights to republish KB articles to the web.
· MVP Private Newsgroups provide forums for MVPs from around the world to share ideas on Microsoft products and technologies with Microsoft employees.
· MVP Product Feedback allows MVPs a direct channel to submit comments, suggestions, and reports of abnormal behavior or potential viruses related to Microsoft products and technologies through the MVP Member’s Web site.
· Technical Support includes 3 free technical support incidents per MVP for use during their award year.
· MVP Webcast offers eligible MVPs the opportunity to deliver web-based sessions on relevant topics for the Microsoft community.
· MSDN or TechNet subscriptions provide MVPs with one-year online priority access to products and expert advice.

B)- Relationship services:
Microsoft assigns an MVP Lead as a relationship owner between Microsoft and MVP community. Like here in Pakistan we have Mr Vaqar Khamisani. MVP Lead is a person who acts as a bridge between MVP community and Microsoft, he is the one who advocates and keeps MVP community updated with latest happenings, initiatives and other opportunities. Through MVP Lead, MVPs get to know about conferences and events where MVPs can participate. A good example of such an event would be "Global MVP Summit", every year Microsoft invites MVPs from all over the world to acknowledge their services and to maintain a close relationship with them. Like this year Adnan Farooq went to attend it and got a special mention from Steve Ballmer.


So thats it from my side and I hope I have been able to answer your queries.

ps: I would also like to refer you to Robert Mc Laws blog entry on "How to become an MVP?".

Hammad Rajjoub

Sunday, October 09, 2005

101 Samples using LINQ

See the LINQ Project in action in these code samples. The sample are in C# for the time being.

Click here for the samples.

Tuesday, October 04, 2005

KPL : Kids Programming Language

KPL (Kids Programming Language) is an awesome initiative and could well replace Basic as "Beginners Programming Language". I cant seem to wait see yound kids/teens writing their code in KPL.

Some people have raised their doubts and have become speculative. Some have event started comparing it VB and feeling disgraced as VB programmers. Which I believe is absolutely ridiculous. We need to see things in right perspectives.

Hammad Rajjoub
www.dotNetPakistan.com

Friday, September 30, 2005

Windows Sharepoint Services service pack 2.0.

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

Hammad Rajjoub
www.dotNetPakistan.com

Tuesday, September 27, 2005

.NET Remoting Vs. Web Services – What To Choose?

.NET Remoting Vs. Web Services – What To Choose?

While developing distributed applications, developers are often faced with the question of whether to choose Remoting or Web Services as the preferred choice. The answer to this question depends on certain factors that are specific to the application and the distributed data transfer strategy being followed. Let’s discuss each of the factors one by one

Security

Security is a major factor to consider while developing distributed applications. As both Web services and .Net Remoting architecture depend on the IIS security features, there is nothing much to choose between the two based on this factor. If, however, IIS is not being used as a host, Remoting is the only option left.

Communication Mode/ Protocol

If the application is to be used by customers on a LAN/WAN, using Remoting with TCP and binary formatters will be a better option as it does not play with data (no need of formatting or data packaging as in SOAP).

If TCP is the protocol being used for communication, using web services is again out of question.

Data Volume

If the amount of data being transferred is huge, using web services will deplete performance. Web services require transformation and serialization of data and this will result in terrible application performance.

Platform/ Interoperability

If both the client and server are using .NET Runtime for execution, remoting will be the best choice as it can utilize the strongly typed data for communication at both ends.

Web Services on the other hand is an easy picking when either client or server or both are running on some platform other than .NET.

State Management

Web Services are inherently stateless and they never correlate multiple calls from the same user unless session management is explicitly enabled in the Web Service. IF enabled, they provide state management using the inherent ASP.NET state management capabilities.

In Remoting, however, you can perform state management in the following ways:

Stateless Objects: Use .NET remoting with Server Activated Single Call objects

Stateful Objects (Per Application): Use .NET remoting with Server Activated Singleton objects.

Stateful Objects (Per Client): Use .NET remoting with Client-Activated Objects

Flexibility/ Scalability

Web Services work through firewalls and other network security as it uses HTTP and XML for packaging and transporting data. Remoting on the other hand cannot provide such flexibility but in the case of using HTTP with SOAP which diminishes the performance of the application.

Web Services are also much more scalable than remoting as they support many platforms and can be used in applications that are not dependent on .NET Runtime.

Performance:

.NET remoting provides the best performance when using Binary formatters and TCP protocol. In effect, the different combinations of protocols and formatting provide different performance levels for web services and remoting. Here is the table that lists them.



























Protocol


Formatter


Best Performance


TCP *


Binary


Remoting


TCP *


SOAP


Web Services


HTTP


SOAP


Web Services


HTTP


Binary


Any


* In case where the TCP protocol is used, the remoting endpoints running on TCP were compared with the HTTP Web Services.

For more information, see the tests conducted to evaluate the performance of both

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/bdadotnetarch14.asp

Development/Deployment

As most of us already know that development, configuration and deployment of web services is much easier than in .NET Remoting infrastructure as they provide a simpler programming model with easy configuration and deployment capabilities.

What to Choose?

Both Web Services and Remoting enable cross-process communication. If your application is in need of interoperability with different platforms and you want it to be flexible enough to accommodate future technology changes, web services is your choice.
Remoting takes the lead where performance, state management and huge data volumes come into consideration.

Wednesday, September 21, 2005

Windows Workflow Foundation

Paul Andrew has got some webcasts targeting especially Windows Workflow Foundation, which will be held during September 26-30, 2005. Make sure you drop by at his blog for the webcasts links. All of you still wondering whats Workflow is, well I have some links to kill your curosity.

Windows Workflow Foundation
Channel 9 coverage




Zeeshan Muhammad.
INETA Pakistan EXCOMM
INETA Pakistan Speaker

Monday, September 19, 2005

PDC 2005 (US) Resource Box : Microsoft Tools & Techs for next Generation!

Microsoft Tools & Techs for next Generation!

Click here to download the slides of PDC 2005.

http://commnet.microsoftpdc.com/content/downloads.aspx (Contain good information about latest tools, like "Workflow in Windows Applicaton", etc.

Bill Gates Speech @ PDC 2005 http://www.microsoft.com/billgates/speeches/2005/09-13PDC05.asp

Regards,
Wajahat Abbas
http://www.wajahatabbas.com
http://www.dotnetpakistan.com

Saturday, September 17, 2005

Cross-Page PostBack - Features and Limitations

This blog is an addendum to the previous article posted by Hammad. I want to share some other features and limitations of this technique.

Strongly Typed PreviousPage property

While casting the PreviousPage property to the “default2.aspx” page, there is always a chance of an invalid cast, this can be eliminated by using the PreviousPageType directive in the destination page i.e. Default2.aspx. This directive will allow us to use a strongly typed PreviousPage property as it defines the url of the page in the VirtualPath attribute.

<%@ PreviousPageType VirtualPath="~/Default.aspx" %>

The properties and controls from the source page can now be accessed using the PrevioousPage property without the need of typecasting as shown in the following excerpt from Default2.aspx Page_load event.


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 = " +
this.PreviousPage.Comments;

this.txtDetails.Text += "Value = " +
this.PreviousPage.Value;

}


PostBackUrl and Button.Click Handlers

Starting from .NET 2.0, there is an IButtonControl Interface and the controls (button, linkButton and ImageButton) including custom controls that implement this interface can be used as a button.
In addition, we can set the PostBackUrl property for controls of this type as:
ID=”PostPage” runat = “server”
PostBackUrl=”~/default2.aspx”
Text=”Post Page” />
By doing this, you don’t even need to handle the Click event of the button.

_PREVIOUSPAGE

When the page contains a control that does cross-page posting, a new hidden field named __PREVIOUSPAGE is created.


Limitations of Cross-Page PostBack

Further, there are also some limitations of using the Cross-Page Postback technique in .Net 2.0.

Access to Query Strings:

Suppose there is some logic in the source page “Default.aspx” for building itself using the query string. Now the page is posted to “Default2.aspx”. If we now access Default.aspx through the PreviousPage property, and use the PreviousPage.Request.QueryString property, it gives you the current page’s query string rather than the query string of Default.aspx (the original page).
i.e. in Default2.aspx
this.PreviousPage.Request.QueryString = =this.Request.QueryString

Server Side Validation

The other problem is with server side validation i.e. when you need to perform some server side validation for the input that the user performs on Default.aspx. In “default2.aspx” code, you can check for the Page.IsValid property but what if the validation fails. There is no way to post the user back to the original page with the original data in tact and show the failure message in case the validation fails.

Introducing LINQ!

Paul Vick introduces LINQ.

Here is an excerpt from his blog.

"To start with, LINQ stands for “Language Integrated QUery.” LINQ fundamentally is about integrating query operations into the .NET platform in a comprehensive and open manner. It’s also about providing a unified way for you to query across any kind of data that you have in your program, whether it’s relational, objects or XML. This, we believe, will represent a tectonic shift in the way that VB programmers will work with data. The possibilities that having query capabilities always available right at your fingertips, regardless of the type of data you’re working with, are immense and will fundamentally alter the way people program."

Read the entire post!

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

www.dotNetPakistan.com

Wednesday, September 14, 2005

Atlas Unleashed!

A while ago, I wrote about the development on Atlas Project on my blog. Scott Guthrie has just unleashed ATLAS at the PDC.

Here is the link to the Official Atlas Website.

Happy Programming!

Saturday, September 10, 2005

Bill Gates on Channel 9

Watch a short interview of Microsoft Chief Software Architect "Bill Gates" at Channel 9.

Video Length: 00:16:34 | Save

Click here to read more.


Zeeshan Muhammad
User Group Leader - NED.net
INETA Pakistan Speaker

Tuesday, September 06, 2005

Web Services are not Distributed Objects

A good debate on "Web Services are not Distributed Objects" by Werner Vogels.

Hope you will like it,

http://weblogs.cs.cornell.edu/AllThingsDistributed/archives/000343.html

Regards,
Wajahat Abbas
http://www.wajahatabbas.com
http://www.dotnetpakistan.com

Monday, September 05, 2005

Getting to know ASP.NET 2.0

When Microsoft released the .NET Framework 1.0 Technology in July 2000, it was immediately clear that Web development was going to change. The company’s prior technology, Active Server Pages (ASP) launched hundreds of books, articles, Web sites and components, all aiming to make the development process easier than before. However, what ASP did not have, was an application framework - it was never an enterprise development tool. Everything in ASP was code oriented - but it simply wasn't possible to avoid doing work without writing codes.
ASP.NET was designed to counter this problem. Right from its initial release as a preview technology, Microsoft ASP.NET has been a huge success. For those people developing web sites using Microsoft technologies, ASP.NET provides a rich programming model, allowing sites to be easily constructed. There has been a lot of talk since its release, but ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of web applications. One of the key design goals of ASP.NET was to make programming easier and quicker by reducing the amount of code that needed to be created. This phenomenon operates when one enters the era of declarative programming model, rich server controls, large class libraries, and support for development tools from the humble Notepad to the high-end Visual Studio .NET.

Yup thats an excerpt from my latest contribution for Spider Magazine. See their September 2005 issue, page 47 if you want to read more. Visual Studio Team System, SQL Server 2005 and Smart Clients are on the list for future publications for both Spider and Dawn Sci-Tech. Feel free to share your comments and suggestions.



Zeeshan Muhammad
User Group Leader - NED.net
Member Speaker Bureau - INETA Pakistan
Member Infrastructure - INETA MEA

New breed in the World of Web Applications

Check it out to see the new breed in the World of Web Applications http://www.start.com

Wajahat Abbas
http://wajahatabbas.blogspot.com
www.dotNetPakistan.com

Saturday, September 03, 2005

MSDN TV Episode talks about "Data Access in ASP.NET 2.0"

Design Patterns :: Dependency Injections (DI)

Today there is a greater focus than ever on reusing existing components and wiring together disparate components to form a cohesive architecture. But this wiring can quickly become a daunting task because as application size and complexity increase, so do dependencies. One way to mitigate the proliferation of dependencies is by using Dependency Injection (DI), which allows you to inject objects into a class, rather than relying on the class to create the object itself.

Read the rest of this article and download the source code from here.


Zeeshan Muhammad

Friday, September 02, 2005

Defining your own Validation File (Web Applications)

Hi All,

One of the very tricky part of the dotnet web application is the facility of the validation web controls.

But what if you require some change on those methods ?

Yes you can modify the javascript validation file for your application. By default every .net web application, access the validaiton file resided in the asp_net_client directory of your wwwroot. But if you want to have your own validation file specfic to your application, you can do that, once you define, all your validation methods call will forward to that file.

What you have to do is to define a property in the web config file.



And now place the WebUIValidation.js in the script_files folder,

Wajahat Abbas
http://www.wajahatabbas.com
http://www.dotnetpakistan.com

Thursday, September 01, 2005

Architectural Overview of Windows SharePoint Services

Summary: Examine the architecture implemented in Microsoft Windows SharePoint Services. Learn what happens on the server when users issue page requests, and how Windows SharePoint Services responds. Understand the role of managed code in relation to unmanaged code in Windows SharePoint Services, and the Windows SharePoint Services database schema.

Click here to read
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/ODC_WSSArchitecture.asp


Wajahat Abbas
http://www.wajahatabbas.com
http://www.dotNetPakistan.com

Playing with cookies

Hi Guys,

There are many ways for maintaining cookies, among which cookie is one the best one. Usually one thing which most of the developers missed, is that they dont specify the expiry limit of a cookie, and whenever they search for the cookie physical prescence they cant find it. It is mandatory to define the limit if you want to see it, in other case it disappear once application close, and it exists virtually.

For more details click here http://msdn.microsoft.com/asp.net/using/migrating/phpmig/whitepapers/cookies.aspx

Wajahat Abbas
http://www.wajahatabbas.com
www.dotNetPakistan.com

Wednesday, August 31, 2005

Web Services and other distributed technologies: Developing Distributed Services Today

Web Services and other distributed technologies: Developing Distributed Services Today

This paper provides guidance on how to best use Microsoft Web service and distributed systems technologies in order to build distributed, service-oriented systems using today's platform. The impact of future technologies such as 'Indigo' is considered, and how Microsoft products such as BizTalk Server, SQL Server Notification Services, and Host Integration Server are positioned in this space

Saturday, August 27, 2005

Some good thing to share with VB.net programmers --- Navigate the .NET Framework and Your Projects with "My"

Though from ages, there is debates on VB credibility, but especially after the release of VB.net its quite low now, and i hope that after the release of vb 2005, it will be near to vanished, with addition of tools and objects like this...


Navigate the .NET Framework and Your Projects with "My"


www.dotNetPakistan.com

Wednesday, August 24, 2005

VS 2005 Web Projects and IIS

Scott Guthrie explains the new Web Project System and its new features (lots of information) and he also explains how VS2005 simplifies handling of IIS Application and Virtual directories.

It is a must-read for every web developer out there wanting to build Web projects in VS 2005.

Tuesday, August 23, 2005

Understanding and developing with SharePoint products and technologies

A very good guide for understanding Microsoft SharePoint Product. I hope you will find it very worthwile, in this single blog, Mark's explain the SharePoint 2003 architecture, he also discuss the web services exposes by SharePoint and some other usefull points.

Read it full @ Understanding and developing with SharePoint products and technologies

Regards,
Wajahat Abbas
http://wajahatabbas.blogspot.com

www.dotNetPakistan.com

Its a Road Trip!

Get Microsoft product knowledge while you travel to work. For more details visit :

Road Trip



www.dotNetPakistan.com

Hammad Rajjoub
http://dotnetwizards.blogspot.com

couple of interesting responses on my previous post

Monday, August 22, 2005

System.IO.StringWriter and UTF-16 Encoding problem with System.XML.XMLDocument

Thursday, August 18, 2005

Microsoft Systems Architecture (MSA)

Nice guide for understanding Microsoft Systems Architecture (MSA) & Internet Data Center. Microsoft Systems Architecture (MSA) is a technology architecture that has been rigorously tested and proven in a partnered lab environment to provide exceptional planning and implementation guidance that addresses fundamental infrastructure issues such as availability, security, scalability, and manageability of the platform. For downloading all

Download
Click here to download all technical materials for the Internet Data Center documentation.


Another very good url for Application Architecture for .Net Application Designing is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/apparchch4.asp This will help you how to design the infrastructure of your .Net applicaiton.

Regards,
Wajahat Abbas
http://www.wajahatabbas.com
www.dotnetpakistan.com