Pages

Monday, October 25, 2010

Best Forum Supporter Award

Hello All,
I am very happy to share this that I have been selected as a Best Forum Supporter for the leading .Net technical site DNS for the 7th time. Thanks to all my friends and well wisher. Keep supporting me.

Here is the Award soft copy.

Thanks
Anil Kumar Pandey
Microsft MVP C# (2009-10,2010-11)
Mumbai, INDIA

Friday, October 22, 2010

InitParameters In Silverlight

Hello friends,
Today I am going to discuss about the InitParameters. These are used to pass some initial value from the aspx page to our silverlight page. In some situation there is a need to pass some values to our silverlight page using our calling page of aspx. Silverlight handles this situation using the INITPARAMETERS. Using the InitParameters is very easy.

The value which we have passed using the parameters can be accessed inside the application start-up event of the app.xaml file. Either we can pass the parameter using the XAML or we can also pass these parameters using the code. the below are the sample for Doing so.


By XAML
We can directly pass the parameters in the aspx page from where we have defined our XAP file to be called on that page like.

InitParameters="Name=Anil,Country=INDIA"
Width="500"


Or by the code like this.

MySilverlightPage.InitParameters="Name=Anil,Country=INDIA"


And for receiving these paramter Open the App.Xaml file and look for the below event

private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
}

In the Above function use the below code to access the parameters passed by the page.

      string Param1 =   e.InitParams[ "Name" ];
      string Param2 =   e.InitParams[ "Country" ];

We have to make use of the string variables to store the value of the paramters. so the above function will be like this.

private void Application_Startup(object sender, StartupEventArgs e)
{
this.RootVisual = new MainPage();
         string Param1 =   e.InitParams[ "Name" ];
         string Param2 =   e.InitParams[ "Country" ];
}


Isn't its Simple. I hope You have liked this sample. I will come up with some new samples on WPF and Silverlight. Please post your comment and let me know what else example you would like to see in the next articles..


Thanks
Anil Kumar Pandey
Microsft MVP C# (2009-10,2010-11)
Mumbai, INDIA

Friday, October 1, 2010

MVP (Most Valuable Professional)

Hello All,
I am very happy to inform you all that I got the most prestigious award from Microsoft Most Valuable Professional (MVP) for the second year. I am feeling top of the world, I would like to thanks all my friends and well wishers you supported me in each moment of my life,I would like to have the tremendous support in future also and thanks to the almighty GOD also.

I promise to continue provide the help to technical community as what ever I am now is because of that only..I Would also like to congratulate all the fellow MVPs whop are selected for this Quarter here are the list for the new members who have joined the MVP community.



VenkataRaviKumar Pidikiti

Directory Services

Rajendra Dewani

Commerce Server

Omkarnath Phatak

Visual Basic

Ashish Khandelwal

Visual C#

Kamlesh Rao

SharePoint Server

Udayakumar Ethirajulu

SharePoint Server

Ayush Jain

Excel

Vijaysaradhi Samavedam

Windows Desktop Experience

Niraj Bhat

Windows Azure

Sivakumar Venkataraman

Dynamics GP

Mahender Pal

Dynamics CRM

Vishnu Tiwari

BizTalk

Kunal Chowdhury

Silverlight

Amit Bhawani

Windows Desktop Experience

Abhishek Bhatnagar

Windows Desktop Experience

Ratish Sekharan Nair

Exchange Server


Please congratulate all of them for becoming a Community leader.

Thanks

Anil Kumar Pandey
MVP (2009,2010)

Kontera