<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1179145860502362999</id><updated>2011-10-27T04:54:07.495+05:30</updated><category term='Microsoft'/><category term='PUG'/><category term='Game'/><category term='Pune'/><category term='SQL Server'/><category term='.Net'/><category term='Pune University'/><category term='WP7'/><category term='Tips'/><category term='CTD'/><category term='Report'/><category term='XNA'/><category term='Visual Studio 2010'/><category term='sessions'/><category term='JQuery'/><category term='Development'/><category term='Windows Phone 7'/><category term='Bing Maps'/><category term='Isolated Storage'/><category term='PuneUserGroup'/><category term='pushpin'/><category term='FILESTREAM'/><category term='ASP.Net'/><category term='polyline'/><category term='Animation'/><category term='WPF'/><category term='Tricks'/><category term='training'/><category term='DevCon'/><title type='text'>Ketaki Kode's Technical Diary</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7688125014624597811</id><published>2011-01-16T12:46:00.000+05:30</published><updated>2011-01-25T12:46:07.681+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>XNA Game Development Tips and Tricks 6: 2D Collision Detection make easy for player</title><content type='html'>&lt;p&gt;We will see how we can do the collision detection and how we can make it a bit easier for the player. Collision detection is one of the most discussed part of game development. Now lets say we have two sprites moving in our game and we want to detect whenever they collide with each other.&lt;/p&gt;  &lt;p&gt;What we have here is Sprite’s X and Y Coordinates and its Width and Height. So we will be taking both sprite’s X and Y coordinates and Width and Height and figure out whether both intersects with each other or not. Let’s take a look at the following code:&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="566"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="564"&gt;&lt;font face="Courier New"&gt;public bool CheckCollision(Rectangle sourceRect, Rectangle destRect)            &lt;br /&gt;{             &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return sourceRect.Intersects(destRect);             &lt;br /&gt;}&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Above code does a perfect collision detection, but there is a little problem with player. We should be giving a little freedom to player so that game does not become very difficult for player. In order to do that we are going to Inflate the Sprite.. dont worry this inflation is only logical and will not be displayed to user.&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="562"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="560"&gt;&lt;font face="Courier New"&gt;public bool CheckCollision(Rectangle sourceRect, Rectangle destRect)            &lt;br /&gt;{&amp;#160; &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sourceRect.Inflate(5, 5);&lt;/font&gt;            &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; return sourceRect.Intersects(destRect);             &lt;br /&gt;}&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;By Inflating we are inflating one of the Sprite by 5x5. We can Inflate both Sprites as well. Depending on how easy you would want game to be you can decide how much sprite you would like to Inflate.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7688125014624597811?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7688125014624597811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7688125014624597811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7688125014624597811'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-6.html' title='XNA Game Development Tips and Tricks 6: 2D Collision Detection make easy for player'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-2426336279370212608</id><published>2011-01-09T10:35:00.000+05:30</published><updated>2011-01-25T10:36:28.794+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>XNA Game Development Tips and Tricks 5: Animate 2D Sprites</title><content type='html'>&lt;p&gt;Animation is very important part of game development, if your game does not have any kind of animation it will look very dull.&lt;/p&gt;  &lt;p&gt;While doing animation we have to consider many aspects of the game:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Animation should not be Slower &lt;/li&gt;    &lt;li&gt;Animation should be not be Faster &lt;/li&gt;    &lt;li&gt;Animation should be Smoother &lt;/li&gt;    &lt;li&gt;Animation should load Faster &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;We will be using following image for the animation:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_ArbE00KmXSQ/TT5aE3ZPb8I/AAAAAAAAAHs/7uA1gcd9bc8/s1600-h/256x324.png"&gt;&lt;img style="display: inline" title="256x32" alt="256x32" src="http://lh4.ggpht.com/_ArbE00KmXSQ/TT5aFvKzg2I/AAAAAAAAAHw/AuxPTYkKb3g/256x32_thumb2.png?imgmax=800" width="240" height="30" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you look at above image, it is single image and not 8 tanks. Reason why we are not having 8 different images and loading them in the game is because it will take more time compared to having single long image loaded. If you have just one single sprite in your game for animation it will not make any difference, but if you have many sprites to be animated you will see significant performance difference. So let us see how we can animate the sprite and how we can control frame rates for the sprite.&lt;/p&gt;  &lt;p&gt;First we will declare all required variables to be use.&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="533"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="531"&gt;&lt;font face="Courier New"&gt;private int FrameCount = 8; //number of frames in image              &lt;br /&gt;private int CurrentFrame = 0; //current frame to display               &lt;br /&gt;private float FrameLength = 0.12f; //Frame length per frame.. calculated 1/8 i.e. one second divided by number of frames (8)               &lt;br /&gt;private float FrameTimer = 0.0f; //Keep note of time&lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Now let’s load the content in memory, and add image to the Content project.&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="532"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="530"&gt;&lt;font face="Courier New"&gt;           &lt;p&gt;mSpriteTexture = Content.Load&amp;lt;Texture2D&amp;gt;(“bluetank”);&lt;/p&gt;         &lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;now, lets write Update code, which will update the current frame number which we would want to show to the user. Code which we have written in Update method will render 8 Frames in a second.&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="533"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="531"&gt;&lt;font face="Courier New"&gt;           &lt;p&gt;public void Update(GameTime gameTime)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FrameTimer += (float)gameTime.ElapsedGameTime.TotalSeconds; //Find out the CurrentTimer and based on this we will calculate which Frame to render.&lt;/p&gt;            &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; if (FrameTimer &amp;gt; FrameLength)              &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; FrameTimer = 0.0f; //Reset FrameTimer to 0               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CurrentFrame = (CurrentFrame + 1) % FrameCount;&amp;#160; //Set CurrentFrame               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;         &lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Finally draw the sprite on the screen with the updated Frame.&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="534"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="532"&gt;&lt;font face="Courier New"&gt;           &lt;p&gt;theSpriteBatch.Draw(mSpriteTexture, Position, new Rectangle(CurrentFrame * 26, 0, 26, mSpriteTexture.Height), Color.White);&lt;/p&gt;         &lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Once you write above code, build it, run it and you should be able to see Your Sprite Animating.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-2426336279370212608?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/2426336279370212608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2426336279370212608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2426336279370212608'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-5.html' title='XNA Game Development Tips and Tricks 5: Animate 2D Sprites'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_ArbE00KmXSQ/TT5aFvKzg2I/AAAAAAAAAHw/AuxPTYkKb3g/s72-c/256x32_thumb2.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-8403508062439395735</id><published>2011-01-01T17:01:00.000+05:30</published><updated>2011-01-01T17:03:05.924+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Game'/><category scheme='http://www.blogger.com/atom/ns#' term='Development'/><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>XNA Game Development Tips and Tricks 4: Forcing and Calculating Frame Rates</title><content type='html'>&lt;p&gt;Happy New Year 2011 to everyone.&lt;/p&gt;  &lt;p&gt;We are going to see how we can control Frame Rates and how we can calculate current Frame rate at which game is getting rendered.&lt;/p&gt;  &lt;p&gt;Frame rates are very very important part of game, actually speaking frame rats are important in every aspect of not just games but also in life.&lt;/p&gt;  &lt;p&gt;Frame rates in video games means rate at which images are being rendered on the screen known as FPS (Frames Per Second). If you do not set correct FPS for game,&amp;#160; gamers will have weird experiences. For example lower Frames Per Second (FPS) will not give them illusion of motion and it will affect the user’s interaction with the game. Today games lock their frame rates to give a steady performance. If you have slower device game frame rates will drop and if you have very high end device game frame rates will increase and may give bad experience to players. Locking Frame Rates will make sure Frame Rates does not go beyond particular point, but we will not be able to control Low Frame Rates much because Low Frame Rates are very much dependent on the resources available.&lt;/p&gt;  &lt;p&gt;Link will give you good examples at Frame Rate Samples : &lt;a title="http://spng.se/frame-rate-test/" href="http://spng.se/frame-rate-test/"&gt;http://spng.se/frame-rate-test/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Windows Phone 7 forces 30 FPS, so whenever you create game for Windows Phone 7, you will see one line of code:&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="464"&gt;&lt;font face="Courier New"&gt;TargetElapsedTime = &lt;font color="#4bacc6"&gt;TimeSpan&lt;/font&gt;.FromTicks(333333);&lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;if you increase Ticks from 333333 to 666666 you will notice decrease in Frame Rates, and if you decrease Ticks from 333333 to 111111 you will notice increase in Frame Rates. On Windows Phone 7 you will not get higher frame rates, because Windows Phone 7 OS forces 30 FPS, but on Console or PC you will see increase in Frames if your device is capable of doing so.&lt;/p&gt;  &lt;p&gt;Now let us look at how we can calculate frames. Write following code in Class declaration.&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="464"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;float&lt;/font&gt; CumulativeFrameTime;               &lt;br /&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; NumFrames;               &lt;br /&gt;&lt;font color="#0000ff"&gt;int&lt;/font&gt; FramesPerSecond;               &lt;br /&gt;&lt;font color="#4bacc6"&gt;SpriteFont&lt;/font&gt; msgFont;&lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Write following code in LoadContent method.&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="464"&gt;&lt;font face="Courier New"&gt;msgFont = Content.Load&amp;lt;&lt;font color="#4bacc6"&gt;SpriteFont&lt;/font&gt;&amp;gt;(&lt;font color="#c0504d"&gt;&amp;quot;score&amp;quot;&lt;/font&gt;); &lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Write following code in Draw method.&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="832"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="830"&gt;&lt;font face="Courier New"&gt;CumulativeFrameTime += (&lt;font color="#0000ff"&gt;float&lt;/font&gt;)gameTime.ElapsedGameTime.TotalMilliseconds / 1000f;               &lt;br /&gt;NumFrames++;               &lt;br /&gt;&lt;font color="#0000ff"&gt;if&lt;/font&gt; (CumulativeFrameTime &amp;gt;= 1f)               &lt;br /&gt;{               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; FramesPerSecond = NumFrames;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; NumFrames = 0;               &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; CumulativeFrameTime -= 1f;               &lt;br /&gt;}               &lt;br /&gt;spriteBatch.DrawString(msgFont, &amp;quot;FPS: &amp;quot; + FramesPerSecond.ToString(), &lt;font color="#0000ff"&gt;new&lt;/font&gt; &lt;font color="#4bacc6"&gt;Vector2&lt;/font&gt;(0, 0), &lt;font color="#4bacc6"&gt;Color&lt;/font&gt;.Black);&lt;/font&gt;&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Above code will calculate FPS and display it on the screen, it is very useful when you are developing game to see, at what point of time your game is dropping FPS and how you can improve on that and many other things.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-8403508062439395735?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/8403508062439395735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8403508062439395735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8403508062439395735'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2011/01/xna-game-development-tips-and-tricks-4.html' title='XNA Game Development Tips and Tricks 4: Forcing and Calculating Frame Rates'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3958422729203965283</id><published>2010-12-29T14:59:00.000+05:30</published><updated>2010-12-29T15:00:28.967+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>XNA Game Development Tips and Tricks 3: Windows Phone 7 Playing Music and Sound FX</title><content type='html'>&lt;p&gt;You are developing a game, and your game is pretty decent but game without sound and music is not good game and does not create excitement that it needs to. For example Xbox 360 has Achievement earning, when you earn achievement sound of achievement earning is so nice to ears that you would love to play game just for the sake of earning achievements. Anyways that's apart coming back to todays tips and tricks. We are going to see how you can play Sound and Music in game using Windows Phone 7, what are challenges, tips and tricks.&lt;/p&gt;  &lt;p&gt;XNA provides two ways of playing sound/music:&lt;/p&gt;  &lt;p&gt;1 – SoundEffect    &lt;br /&gt;2 – Song using MediaPlayer&lt;/p&gt;  &lt;p&gt;When you want to play small sounds, like explosion of bomb or sound of coin dropping on floor or similar sound effects you would want to use SoundEffect class. and when you want to play Background Music you would want to use Song class. Difference is that SoundEffect only plays WAV files, so when you use Music as WAV file, your music would be at-least 1 minute long, and 1 minute for WAV file is huge, your wav file will be very large approximate 20-30 MB.&lt;/p&gt;  &lt;p&gt;Song class has another issue that at a time we can play only one file, we can not play more than 1 file simultaneously. So if you want to play Human voice, you might want to make them as WAV file and play them using SoundEffect class.&lt;/p&gt;  &lt;p&gt;Have a look at following code:&lt;/p&gt;  &lt;p&gt;   &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign="top" width="464"&gt;&lt;font color="#4bacc6"&gt;SoundEffect&lt;/font&gt; sfx = Content.Load&amp;lt;&lt;font color="#4bacc6"&gt;SoundEffect&lt;/font&gt;&amp;gt;(&lt;font color="#c0504d"&gt;“coinsound”&lt;/font&gt;);             &lt;br /&gt;sfx.CreateInstance().Play(); &lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt; &lt;/p&gt;  &lt;p&gt;Above code will load content which is “coinsound” in wav file format, we create it’s instance and then play. Now you must be wondering why to call CreateInstance? when we are already initializing object. Now take a case when you collect coin you want to play sound so you execute above code, now above code works fine, but what if we collect multiple coins at same time then what to do in that case? In that case above code will produce sound of coin only once, even if you execute Play method multiple times, and will not give kind of effect we are looking for. So to produce multiple sound effect of same sound file, we can use same object but every time we will have to call CreateInstance and then call Play method.&lt;/p&gt;  &lt;p&gt;Now, for playing Music we write below code:&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="464"&gt;&lt;font color="#4bacc6"&gt;Song&lt;/font&gt; sng = Content.Load&amp;lt;&lt;font color="#4bacc6"&gt;Song&lt;/font&gt;&amp;gt;(&lt;font color="#c0504d"&gt;“backmusic”&lt;/font&gt;);           &lt;br /&gt;&lt;font color="#4bacc6"&gt;MediaPlayer&lt;/font&gt;.Play(sng);          &lt;br /&gt;&lt;font color="#4bacc6"&gt;MediaPlayer&lt;/font&gt;.IsRepeating = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Notice we are using MediaPlayer class for playing music, it means it will be using Zune Player to play the music. Now when you write above code and run your application you will come across given below error:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;“Song playback failed. Please verify that the song is not DRM protected. DRM protected songs are not supported for creator games.”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_ArbE00KmXSQ/TRr_rsraTtI/AAAAAAAAAHk/OKr7QNSU6X0/s1600-h/image%5B2%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_ArbE00KmXSQ/TRr_syO7geI/AAAAAAAAAHo/SNEMA_quDYI/image_thumb.png?imgmax=800" width="244" height="113" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This happens because your Windows Phone’s Zune Library is locked by Zune Software on PC.. Currently possible way of doing is to first run your game through Visual Studio on Device, when you encounter above error, stop debugging, disconnect device from PC and then start game on device through applications, and now you should be able to hear Music. &lt;strong&gt;&lt;u&gt;&lt;font color="#ff0000"&gt;NOTE&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;: When you do &lt;strong&gt;SoundEffect&lt;/strong&gt; you will not have any problem as above, It is only with &lt;strong&gt;MediaPlayer&lt;/strong&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3958422729203965283?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3958422729203965283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3958422729203965283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3958422729203965283'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-3.html' title='XNA Game Development Tips and Tricks 3: Windows Phone 7 Playing Music and Sound FX'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_ArbE00KmXSQ/TRr_syO7geI/AAAAAAAAAHo/SNEMA_quDYI/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-5814919802669487598</id><published>2010-12-26T10:00:00.001+05:30</published><updated>2010-12-26T10:01:41.966+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>XNA Game Development Tips and Tricks 2: Windows Phone 7 Full Screen Game</title><content type='html'>&lt;p&gt;Whenever you develop a game for Windows Phone 7 using XNA game does not start in Full Screen mode, meaning when game starts it does not occupy the entire screen instead it leaves some space on top if running in Portrait mode or leaves some space on left side if running in Landscape mode.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_ArbE00KmXSQ/TRX7hSg6PJI/AAAAAAAAAHE/JQcCkxOnqFA/s1600-h/image2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_ArbE00KmXSQ/TRX7iaN5_9I/AAAAAAAAAHI/ciNr0WoiYFE/image_thumb.png?imgmax=800" width="136" height="244" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://lh3.ggpht.com/_ArbE00KmXSQ/TRX7j4l-7kI/AAAAAAAAAHM/BwReNcXp8F4/s1600-h/image8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_ArbE00KmXSQ/TRX7kimNLJI/AAAAAAAAAHQ/2Aeubnf18uA/image_thumb2.png?imgmax=800" width="244" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This happens because Windows Phone Operating System makes top space or left space available for the battery meter indicator, time, cell signal, wifi signal, etc… now this can make your game look really bad and you will not be able to utilize the entire screen. So what to do if you want to occupy entire screen? Well, very simple you just have to write one single line of code, look at below code snippet:&lt;/p&gt;  &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="464"&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt; Game1()           &lt;br /&gt;{           &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; graphics = &lt;font color="#0000ff"&gt;new&lt;/font&gt; &lt;font color="#4bacc6"&gt;GraphicsDeviceManager&lt;/font&gt;(&lt;font color="#0000ff"&gt;this&lt;/font&gt;);           &lt;br /&gt;&lt;b&gt;&amp;#160;&amp;#160;&amp;#160; graphics.IsFullScreen = &lt;font color="#0000ff"&gt;true&lt;/font&gt;;             &lt;br /&gt;&lt;/b&gt;&amp;#160;&amp;#160;&amp;#160; Content.RootDirectory = &amp;quot;Content&amp;quot;;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TargetElapsedTime = &lt;font color="#4bacc6"&gt;TimeSpan&lt;/font&gt;.FromTicks(333333);           &lt;br /&gt;}&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Writing above code will hide the bar which occupied the space. But this does not mean your game will block calls, notifications, etc.. whenever any kind of notification or call arrives Windows Phone Operating System will alert your game saying User is not able to see screen so that you can pause the game. This happens only when you receive a call or notification which would take up a space of screen.&lt;/p&gt; &lt;p&gt;For the partial-screen &lt;b&gt;Obscured&lt;/b&gt; notification and the tombstoning notification to the &lt;b&gt;Game.Deactivated&lt;/b&gt; event will be fired. &lt;b&gt;PhoneApplicationService.Deactivated&lt;/b&gt; event will fires for both Silverlight and XNA when the app is being tombstoned. Obscured and Unobscured are not binded in App.xaml.cs file is because there will be many non-game applications which will not need to use these events.&lt;/p&gt;  &lt;p&gt;Once you done with the above code, compile and run the code and notice the difference.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_ArbE00KmXSQ/TRX7l33EJTI/AAAAAAAAAHU/-UwP1kEdMCI/s1600-h/image%5B6%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_ArbE00KmXSQ/TRX7mp8tU9I/AAAAAAAAAHY/vpshhauNudw/image_thumb%5B2%5D.png?imgmax=800" width="136" height="244" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://lh6.ggpht.com/_ArbE00KmXSQ/TRX7oEvo74I/AAAAAAAAAHc/Uew5hWhsZZY/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_ArbE00KmXSQ/TRX7ouUfNII/AAAAAAAAAHg/QrhAJ_3agT0/image_thumb%5B4%5D.png?imgmax=800" width="244" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-5814919802669487598?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/5814919802669487598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5814919802669487598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5814919802669487598'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-2.html' title='XNA Game Development Tips and Tricks 2: Windows Phone 7 Full Screen Game'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_ArbE00KmXSQ/TRX7iaN5_9I/AAAAAAAAAHI/ciNr0WoiYFE/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7166506858905232200</id><published>2010-12-25T11:39:00.002+05:30</published><updated>2010-12-25T19:18:35.271+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XNA'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>XNA Game Development Tips and Tricks 1: Windows Phone 7 Portrait Mode</title><content type='html'>&lt;p&gt;Hello, with this blog post I am starting tips and tricks on Developing Games on Windows Phone 7 using XNA.. or in general XNA.&lt;/p&gt;  &lt;p&gt;By default whenever you develop game for Windows Phone 7 using XNA, your game will always start in Landscape mode. Your emulator will start in portrait mode, but game is playable in landscape mode.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_ArbE00KmXSQ/TRWKzKqhR6I/AAAAAAAAAGw/02ijeED2UqE/s1600-h/image%5B2%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_ArbE00KmXSQ/TRWKz4A-eMI/AAAAAAAAAG0/hoIGzXRMWgQ/image_thumb.png?imgmax=800" width="244" height="136" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Let’s say you have requirement of developing game for portrait mode and not landscape mode, you have to add 2 lines of code. In your game after you initialize &lt;strong&gt;&lt;font color="#4f81bd"&gt;GraphicsDeviceManager&lt;/font&gt;&lt;/strong&gt; write following 2 lines:&lt;/p&gt;    &lt;p&gt;&amp;#160;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;       &lt;table style="background-color: #ffffdd" border="1" cellspacing="0" cellpadding="0" width="466"&gt;&lt;tbody&gt;           &lt;tr&gt;             &lt;td valign="top" width="464"&gt;&lt;font color="#0000ff"&gt;public&lt;/font&gt; Game1()                 &lt;br /&gt;{                 &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; graphics = &lt;font color="#0000ff"&gt;new&lt;/font&gt; &lt;font color="#4bacc6"&gt;GraphicsDeviceManager&lt;/font&gt;(&lt;font color="#0000ff"&gt;this&lt;/font&gt;);                 &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Content.RootDirectory = &amp;quot;Content&amp;quot;;                 &lt;br /&gt;&lt;b&gt;&amp;#160;&amp;#160;&amp;#160; graphics.PreferredBackBufferWidth = 480;                  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; graphics.PreferredBackBufferHeight = 800;&lt;/b&gt;                 &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; TargetElapsedTime = &lt;font color="#4bacc6"&gt;TimeSpan&lt;/font&gt;.FromTicks(333333);                 &lt;br /&gt;}&lt;/td&gt;           &lt;/tr&gt;         &lt;/tbody&gt;&lt;/table&gt;     &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&lt;/p&gt;    &lt;p&gt;after writing above code, compile and run it. .and you will have your game starting in Portrait mode.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_ArbE00KmXSQ/TRWK1KcPpWI/AAAAAAAAAG4/w8XUnTkhNoQ/s1600-h/image%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_ArbE00KmXSQ/TRWK2J7cXdI/AAAAAAAAAG8/eQsFAhZEUOY/image_thumb%5B1%5D.png?imgmax=800" width="136" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7166506858905232200?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7166506858905232200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7166506858905232200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7166506858905232200'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/12/xna-game-development-tips-and-tricks-1.html' title='XNA Game Development Tips and Tricks 1: Windows Phone 7 Portrait Mode'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_ArbE00KmXSQ/TRWKz4A-eMI/AAAAAAAAAG0/hoIGzXRMWgQ/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4947222668620086334</id><published>2010-12-24T18:12:00.001+05:30</published><updated>2010-12-24T18:16:19.540+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='PUG'/><category scheme='http://www.blogger.com/atom/ns#' term='PuneUserGroup'/><category scheme='http://www.blogger.com/atom/ns#' term='DevCon'/><category scheme='http://www.blogger.com/atom/ns#' term='sessions'/><title type='text'>PuneUserGroup’s DevCon 2010</title><content type='html'>PUG DevCon 2010 was held on 18-19 December 2010 in ICC Towers, Pune. It was multi track event. &lt;br /&gt;&lt;br /&gt;On 1st day we had 2 tracks. In 1st track, sessions were taken by Sanjay Vyaas, Nauzad Kapadia and Sarang Datye. In 2nd track, sessions were taken by Ashiwni Shahane, Saranya Sriram, Dhaval Faria and Ketaki Kode. Topics covered on 1st day were NET 4.0, multithreaded applications with Net 4.0, Office business applications, Azure applications, Cloud, XNA and Silverlight. &lt;br /&gt; &lt;br /&gt;On 2nd day we had 3 tracks. 1st track included VS2010 sessions, 2nd track included Silverlight sessions and 3rd track included Sharepoint sessions. Sessions on 2nd day were taken by, Dhananjay Kumar, Subodh Sohoni, Gouri Sohoni, Kunal Chowdhary, Pradnya Naik, Nauzad Kapadia, Mahesh Sabnis, Mayur Tendulkar, Sudhendra Kohlam, Monish Darda, Raj Chaudhari, Sankool Shah and Dhaval Faria.&lt;br /&gt;&lt;br /&gt;I was speaker for 1st day 2nd track. I spoke on Developing games using XNA game studio along with Dhaval Faria. I covered theory part of basics on building a game, previous video game consoles. Dhaval Faria covered the coding part for a game. Being a PUG volunteer, I also handled registration counter for both days. &lt;br /&gt;&lt;br /&gt;Whole event was a big hit. Almost 140 people attended on Day 1 and 100 people attended on Day 2.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4947222668620086334?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4947222668620086334/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/12/puneusergroups-devcon-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4947222668620086334'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4947222668620086334'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/12/puneusergroups-devcon-2010.html' title='PuneUserGroup’s DevCon 2010'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-5256818077399839656</id><published>2010-11-25T11:24:00.009+05:30</published><updated>2010-11-25T11:34:33.982+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Isolated Storage'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>Isolated Storage in Windows Phone 7</title><content type='html'>Hello.. I hope all are enjoying Windows Phone 7 development.. This is 1 more blog on Windows Phone 7. This blog is regarding isolated storage of Windows Phone 7. In this blog I am going to include a brief introduction on isolated storage of Windows Phone 7 and 1 demo along with its screenshots.&lt;br /&gt;&lt;br /&gt;Isolated storage is basically local storage of your Windows Phone 7 mobile. Your applications can save its data in this isolated storage. It is compulsory for the user to save their application data in isolated storage. Windows Phone 7 does not allow storing files in any other file system locations.&lt;br /&gt;&lt;br /&gt;Let’s see what exactly isolated storage means. “Isolated” means separated from others. So basically, in this storage each application’s data is isolated from each other. Means 1 application can’t see and access another application’s data. But sometimes it may happen that your 1 application may need data of another application. Then the best option is use of Cloud. You can put your data in cloud and access whichever data you want for any application.&lt;br /&gt;&lt;br /&gt;It is very important that developer should keep a watch on data storage. It’s important that you should conserve data space. You can do this by deleting temporary data in storage. Also if user creates any data in the application, developer should allow them to delete it later which will help to conserve space. Using cloud as option is another way of conserving data space. Always give user, information about data getting stored in storage through your application so that if storage is getting full, user will get to know it and accordingly user can delete files.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO34L8aCC6I/AAAAAAAAAE0/ZMygmUcacTI/s1600/struct.gif"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 286px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO34L8aCC6I/AAAAAAAAAE0/ZMygmUcacTI/s400/struct.gif" alt="" id="BLOGGER_PHOTO_ID_5543359600440511394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The above figure is taken from msdn site. You can refer msdn site &lt;a href="http://msdn.microsoft.com/en-us/library/ff402541%28v=VS.92%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff402541%28v=VS.92%29.aspx &lt;/a&gt; for this. This figure shows you the actual storage of data. Figure is self-explanatory. Upper is the main Application Data Store Folder. It has two parts local settings and files and folders structure. 1st is Local Settings which updates the changes made by developer to the application directory. 2nd part is Files and Folders. You can access it by using API. Using these APIs developer can create, delete and manipulate files and folders.&lt;br /&gt;Now let’s see demo for isolated storage.&lt;br /&gt;&lt;br /&gt;Step 1:-&lt;br /&gt;&lt;br /&gt;As we have to develop windows phone application, we need to choose Windows Phone application in Visual Studio. So it will be File -&gt; New -&gt; Project -&gt; Windows Phone Application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO34i_kaVRI/AAAAAAAAAE8/LIAv9MuWeCg/s1600/1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO34i_kaVRI/AAAAAAAAAE8/LIAv9MuWeCg/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5543359996426343698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you create a new project you will get your project on your screen as shown in below figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO34sNe-zvI/AAAAAAAAAFE/rQWpYK3X8Sc/s1600/2.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO34sNe-zvI/AAAAAAAAAFE/rQWpYK3X8Sc/s400/2.png" alt="" id="BLOGGER_PHOTO_ID_5543360154780487410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 2:-&lt;br /&gt;&lt;br /&gt;In this demo I am going to show you how to write and store data in isolated storage and also how to read data from isolated storage.&lt;br /&gt;For that I am going to use 1 textbox to take input from user, 1 button to save data, 1 textblock to display stored data and again 1 button to retrieve data from isolated storage and display in above textblock. You can see this UI in figure below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO342YN5_xI/AAAAAAAAAFM/2QHTDSPH740/s1600/3.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO342YN5_xI/AAAAAAAAAFM/2QHTDSPH740/s400/3.png" alt="" id="BLOGGER_PHOTO_ID_5543360329460350738" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 3:-&lt;br /&gt;&lt;br /&gt;Code behind..&lt;br /&gt;&lt;br /&gt;As we have to use isolated storage, we need to add 2 IO namespaces.&lt;br /&gt;System.IO&lt;br /&gt;System.IO.IsolatedStorage&lt;br /&gt;So at start you add these namespaces by including using statement in your code behind.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO34_1E3VGI/AAAAAAAAAFU/ykFmtwXnUnE/s1600/4.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TO34_1E3VGI/AAAAAAAAAFU/ykFmtwXnUnE/s400/4.png" alt="" id="BLOGGER_PHOTO_ID_5543360491825878114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 4:-&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO362Tcc9lI/AAAAAAAAAFc/sIUXTQ3sQVY/s1600/5.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO362Tcc9lI/AAAAAAAAAFc/sIUXTQ3sQVY/s400/5.png" alt="" id="BLOGGER_PHOTO_ID_5543362527202440786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here we are going to include the steps for writing and reading data from isolated storage.&lt;br /&gt;&lt;br /&gt;In the above figure you can see two methods written btnSave_Click and btnShow_Click. btnSave_Click is written for writing and storing data in isolated storage and btnShow_Clickis written for displaying data from isolated storage.&lt;br /&gt;Let’s start with storing data. Here IsolatedStorageFile represents an isolated storage area containing files and folders. So basically using IsolatedStorageFile we can create directories, files etc were we can store our data. Later on we have created a directory called Data in storage. We can create files in this directory and store data in it. After that we going to use StreamWriter  to write data in a file. So what we actually doing here is, 1st we creating a new IsolatedStorageFileStream  for a file abc.txt in above created folder. Mode of this file is Create as we going to create this file in above created store (isf in our code). This whole argument is been given to StreamWriter. Later on we going to write in this file whatever input we had taken from the user. Thus we are done with writing data in file.&lt;br /&gt;&lt;br /&gt;Now let’s see how to retrieve data. Here again we declaring new IsolatedStorageFile same way as above. Here as we have to read data we going to use StreamReader. So similarly, creating a new IsolatedStorageFileStream  for a file abc.txt in above created folder. Mode of this file is Open as we going to open this file which was already created above in our store (isf in our code). This whole argument is been given to StreamReader. After this, we reading data from that file and displaying it in textblock. Thus we are done with reading data in file.&lt;br /&gt;&lt;br /&gt;Step 5:-&lt;br /&gt;&lt;br /&gt;Now let’s run our application by pressing F5. You will get on screen as shown in below figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ArbE00KmXSQ/TO37D1fxz8I/AAAAAAAAAFk/5Goyujwpmvw/s1600/6.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 211px; height: 400px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/TO37D1fxz8I/AAAAAAAAAFk/5Goyujwpmvw/s400/6.png" alt="" id="BLOGGER_PHOTO_ID_5543362759681494978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is going to be the UI which we had designed.&lt;br /&gt;&lt;br /&gt;Now let’s enter input in textbox which will be stored in isolated storage.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ArbE00KmXSQ/TO37MWd3i_I/AAAAAAAAAFs/udFJYiUMU3I/s1600/7.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 215px; height: 400px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/TO37MWd3i_I/AAAAAAAAAFs/udFJYiUMU3I/s400/7.PNG" alt="" id="BLOGGER_PHOTO_ID_5543362905970805746" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you click Save button your data gets saved in isolated storage and you get a message box that your data is stored.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO37TUeYjDI/AAAAAAAAAF0/LdCBGp5dERA/s1600/8.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 214px; height: 400px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TO37TUeYjDI/AAAAAAAAAF0/LdCBGp5dERA/s400/8.PNG" alt="" id="BLOGGER_PHOTO_ID_5543363025695181874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now let’s retrieve this stored data. Click on Show button and you will get the stored data in your textblock as shown in below figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TO37Xks1wlI/AAAAAAAAAF8/TXpIwRDblj4/s1600/9.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 214px; height: 400px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TO37Xks1wlI/AAAAAAAAAF8/TXpIwRDblj4/s400/9.PNG" alt="" id="BLOGGER_PHOTO_ID_5543363098770260562" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That’s it!!! We are done with our isolated storage demo. Will be back soon with such more interesting blogs. Till that time, Good bye and enjoy WP7 developing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-5256818077399839656?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/5256818077399839656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/isolated-storage-in-windows-phone-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5256818077399839656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5256818077399839656'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/isolated-storage-in-windows-phone-7.html' title='Isolated Storage in Windows Phone 7'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ArbE00KmXSQ/TO34L8aCC6I/AAAAAAAAAE0/ZMygmUcacTI/s72-c/struct.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-8307425645231239945</id><published>2010-11-17T12:20:00.000+05:30</published><updated>2010-11-17T12:20:00.917+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>Visual Studio Crash After Installing Windows Phone 7 SDK</title><content type='html'>&lt;p&gt;After installing Windows Phone 7 SDK, when you start Visual Studio 2010 and Click on New Project or immediately after starting Visual Studio 2010, Visual Studio crash run following command in Visual Studio Command Prompt by going to Start &amp;gt; All Programs &amp;gt; Visual Studio 2010 &amp;gt; Visual Studio Tools &amp;gt; Visual Studio Command Prompt&lt;/p&gt;  &lt;p&gt;devenv.exe /installvstemplates&lt;/p&gt;  &lt;p&gt;Cause: if you run devenv.exe /Log C:\output.txt in your txt file you will notice that there are some duplicate entries for the Project Templates. By running above specified command it will reinstall VS Templates, and solve the issue.&lt;/p&gt;  &lt;p&gt;Happy Windows Phone 7 Development :)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-8307425645231239945?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/8307425645231239945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/visual-studio-crash-after-installing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8307425645231239945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8307425645231239945'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/visual-studio-crash-after-installing.html' title='Visual Studio Crash After Installing Windows Phone 7 SDK'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-5122071140100713692</id><published>2010-11-15T21:02:00.008+05:30</published><updated>2010-11-15T21:28:11.103+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>Submitting Windows Phone 7 Applications to MarketPlace</title><content type='html'>Hello.. We had seen how to develop an application for Windows Phone 7. We had seen a very basic application Hello World Application. We will see more later. This blog is for those who are ready with their applications or will be ready with their application. In my blog am going to explain the steps how you can submit your application on Marketplace.&lt;br /&gt;&lt;br /&gt;So we have to start with creating an account. Once it’s done go to this site &lt;a href="http://create.msdn.com/en-US/" style="color:Blue"&gt; http://create.msdn.com/en-US/ &lt;/a&gt; . Login onto this site with username and password of the account created. Once you login you will get below image on your screen.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ArbE00KmXSQ/TOFTj3xlq1I/AAAAAAAAAEE/bmijhc81v6E/s1600/1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 259px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/TOFTj3xlq1I/AAAAAAAAAEE/bmijhc81v6E/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5539800892374887250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On left hand side you can see written Submit for Windows Phone. As the name suggests, if you want to submit your windows phone application you can click here for further procedure. Basically, this is a 5-step procedure which you have to complete for submitting your application on Marketplace.&lt;br /&gt;&lt;br /&gt;1) Upload&lt;br /&gt;2) Description&lt;br /&gt;3) Artwork&lt;br /&gt;4) Pricing&lt;br /&gt;5) Submit&lt;br /&gt;&lt;br /&gt;I will explain you these steps in detail once step by step. So back to Home page. When you will click on “Submit for Windows Phone”, you will a form of “upload” on your screen. You need to upload .xap file of your application. Now what is .xap file.&lt;br /&gt;&lt;br /&gt;A .xap file is basically a compiled Silverlight application. The file is actually a .zip file that contains all the files necessary for the application. Just rename the .xap file to have a .zip extension and then you can open it up to see its contents. The .xap file contains an application manifest (AppManifest.xaml) file and all the necessary DLL's that are required by the application. This .xap file is placed in \Bin\Release or \Bin\Debug.&lt;br /&gt;&lt;br /&gt;This .xap file to upload should not exceed than 400MB. In the form you can see, Application name. Give your application name. In Application Platform select Windows Phone 7. In language select English language. In version select the version which you have used. In Application Package upload your application. Below two are optional things. Once your upload form filling is done, click Next. It will take you to next step, “description”.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TOFT3yjGVCI/AAAAAAAAAEM/H8qC38q126A/s1600/2.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 396px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TOFT3yjGVCI/AAAAAAAAAEM/H8qC38q126A/s400/2.png" alt="" id="BLOGGER_PHOTO_ID_5539801234569319458" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Above image shows how your description form will be. It consist complete description of your application. Depending on this form users will decide to buy your application or not as they will get complete description of your application. So I will suggest you to use many keywords so that it’s easy to for users to find your application. Now let’s see details about form. 1st is application title. You can write here according to your application. Similarly you can select category according to your application. Next is the detailed description. This is the main thing which user will go through. So write as much as possible. Next is optional part. Next field is keywords. Write as many keywords as I mentioned above. Legal URL field is optional. Then is Support Email Address. This field is also optional. But I will suggest you to add this email so that if any user has any issues or questions with your application he can mail you those solutions. So that once you solve those issues user will be satisfied completely. So it’s better to add Support Email Address. Required device capabilities field. This includes the requirements for your application.&lt;br /&gt;&lt;br /&gt;Once your upload form filling is done, click Next. It will take you to next step, “artwork”.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFUE2pjl0I/AAAAAAAAAEU/XrBxBWMxT4Y/s1600/3.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 382px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFUE2pjl0I/AAAAAAAAAEU/XrBxBWMxT4Y/s400/3.png" alt="" id="BLOGGER_PHOTO_ID_5539801459008444226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Above image shows your artwork form. Artwork form includes tiles or images of your application. This will attract user to buy your application. Large mobile app tile and Small mobile app tile includes tiles of your application. Large has size of 173 X 173px and Small has 99 X 99px. Similarly size of Large PC app title is 200 X 200px. For creating this image you can use &lt;a href="http://www.blogger.com/%E2%80%9Dhttp://www.getpaint.net/index.html%E2%80%9D"&gt;Paint.Net&lt;/a&gt; or Photoshop. Talking about images, you have to adjust your application image dimensions same like mentioned above. Even if it changes a bit, it will fail. Next field is Background art which is optional field. Next is screenshots. You can add screenshots of your application in this field. With these screenshots user will get proper idea about  your application. You can add upto 8 screenshots. Its size is 480 X 800px.&lt;br /&gt;&lt;br /&gt;Once your upload form filling is done, click Next. It will take you to next step, “pricing”.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFURWbJLxI/AAAAAAAAAEc/NChZ1B_jW_o/s1600/4.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 341px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFURWbJLxI/AAAAAAAAAEc/NChZ1B_jW_o/s400/4.png" alt="" id="BLOGGER_PHOTO_ID_5539801673696358162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Above image shows your pricing form. In this, 1st field is for trial mode. If your application has trial mode, tick this field. Next is worldwide distribution tick it as your application will be up for whole world. Primary offer currency, you can set this according to your convenience. You can set it as USD etc. Application Price is the price of your application. Set it as per your calculation. You can submit 5 free applications per account.&lt;br /&gt;&lt;br /&gt;Once your upload form filling is done, click Next. It will take you to next step, “submit”.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TOFUeWI2sCI/AAAAAAAAAEk/U_2lzB1CTP4/s1600/5.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 304px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TOFUeWI2sCI/AAAAAAAAAEk/U_2lzB1CTP4/s400/5.png" alt="" id="BLOGGER_PHOTO_ID_5539801896957947938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the last form. There is only 1 option in this form. Automatically publish to Marketplace after passing certification. Tick this. Once you tick this click on button “Submit for certification” below.&lt;br /&gt;&lt;br /&gt;So you are done with submitting your application in Marketplace. Once it’s done you can visit your app hub to see the status. Most of the Windows Phone 7 apps are being tested / approved within a few days. Its same as below image.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFUny5vvhI/AAAAAAAAAEs/z0irNd0YB9E/s1600/6.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 179px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TOFUny5vvhI/AAAAAAAAAEs/z0irNd0YB9E/s400/6.png" alt="" id="BLOGGER_PHOTO_ID_5539802059298029074" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If your app fails testing, then Microsoft will send you an email detailing the reason for failure.&lt;br /&gt;&lt;br /&gt;This is all with this blog. Will be back soon with few more blogs regarding Windows Phone 7!!! Till that time bye and enjoy development for Windows Phone 7.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-5122071140100713692?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/5122071140100713692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/submitting-windows-phone-7-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5122071140100713692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5122071140100713692'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/submitting-windows-phone-7-applications.html' title='Submitting Windows Phone 7 Applications to MarketPlace'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ArbE00KmXSQ/TOFTj3xlq1I/AAAAAAAAAEE/bmijhc81v6E/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3533010902087072252</id><published>2010-11-10T10:44:00.000+05:30</published><updated>2010-11-10T10:44:00.541+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>2nd Release of Silverlight for Windows Phone Toolkit</title><content type='html'>&lt;p&gt;Microsoft Published &lt;a href="http://silverlight.codeplex.com/releases/view/55034" target="_blank"&gt;Silverlight for Windows Phone Toolkit November 2010 release&lt;/a&gt;. Which means you get more and more and more controls to be used for Windows Phone 7 Development.&lt;/p&gt;  &lt;p&gt;More Info: &lt;a href="http://blogs.msdn.com/b/delay/archive/2010/11/02/mo-controls-mo-controls-mo-controls-announcing-the-second-release-of-the-silverlight-for-windows-phone-toolkit.aspx" target="_blank"&gt;MSDN Delay's Blog&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3533010902087072252?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3533010902087072252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/2nd-release-of-silverlight-for-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3533010902087072252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3533010902087072252'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/2nd-release-of-silverlight-for-windows.html' title='2nd Release of Silverlight for Windows Phone Toolkit'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-167852595037817849</id><published>2010-11-09T11:44:00.000+05:30</published><updated>2010-11-09T11:58:37.891+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>Windows Phone 7</title><content type='html'>Hello all. I am back with my blogs once again. This time I am going to write a blog on a current hot topic. Guessed correct!!! Windows Phone 7.&lt;br /&gt;All are excited with WP7 topic. Not only for use but also for development of WP7 applications. So for what are we waiting? Let’s start building applications..&lt;br /&gt;I will start with a very basic application and as we all know our tradition “Hello World Application”. I will include screenshots for each of my step so that it’s easy for you to understand visually too. So let’s start…&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 1-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let’s start from very basic part – creating new project.&lt;br /&gt;Go to File -&gt; New -&gt; Project.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjnH4wXFrI/AAAAAAAAACc/fcWQVPUZSXY/s1600/1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjnH4wXFrI/AAAAAAAAACc/fcWQVPUZSXY/s320/1.png" alt="" id="BLOGGER_PHOTO_ID_5537429864532350642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You will get a screen where you will get options. Check on left hand side, select a language C# or VB and select Silverlight for Windows Phone. After selecting it you will get options regarding Windows Phone Applications on right hand side. Select 1st option – Windows Phone Application. Give your application name below. I have given it name WP7HelloWorld.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TNjnRdOamFI/AAAAAAAAACk/cVe6Xt13KUI/s1600/2.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TNjnRdOamFI/AAAAAAAAACk/cVe6Xt13KUI/s320/2.png" alt="" id="BLOGGER_PHOTO_ID_5537430028940908626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 2-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will get a screen where you can see two splitted windows. On left side you can see WP7 device and on right side you can see XAML code. You can design on device using tools from toolbox. If you want to make changes in design through code you can do it on right side.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjnbbHrMII/AAAAAAAAACs/xq8E2Cce0W4/s1600/3.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjnbbHrMII/AAAAAAAAACs/xq8E2Cce0W4/s320/3.png" alt="" id="BLOGGER_PHOTO_ID_5537430200174456962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On top of the device its written My Application this is the name of the title which you can change. Just below is written page name. This also you can edit according to your application. In my application I have changed “My Application” to “Hello World Application” and similarly have changed “page name” to “Hello World”.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjnw7sl6pI/AAAAAAAAAC0/RAfBhY3pFBY/s1600/4.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjnw7sl6pI/AAAAAAAAAC0/RAfBhY3pFBY/s320/4.png" alt="" id="BLOGGER_PHOTO_ID_5537430569696488082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 3-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next step we going to do is placing controls. I am going to use 1 textbox where we will take input from user (will take their name as input), 1 button on clicking of which will display output and 1 textblock (which is label in windows forms) to display output. In below screenshot you can see the alignment of these 3 controls. You can select these controls from toolbox which you can see on left side. If toolbox is not visible you can view it from View -&gt; Toolbox.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjn6jJie2I/AAAAAAAAAC8/xWwCK7Es6XY/s1600/5.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjn6jJie2I/AAAAAAAAAC8/xWwCK7Es6XY/s320/5.png" alt="" id="BLOGGER_PHOTO_ID_5537430734905703266" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Step 4-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We want to execute application when user clicks on button. So let’s write code on button click event.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ArbE00KmXSQ/TNjoDyToSeI/AAAAAAAAADE/-ZqL0l488AA/s1600/6.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/TNjoDyToSeI/AAAAAAAAADE/-ZqL0l488AA/s320/6.png" alt="" id="BLOGGER_PHOTO_ID_5537430893593381346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now what exactly we going to do in our application is, we will take name as input from user through textbox and once user clicks on button we will display “Hello ……” in textblock. So we are going to write the code as shown in below screenshot.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjoMpDuyeI/AAAAAAAAADM/wJaDqQU7IdU/s1600/7.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjoMpDuyeI/AAAAAAAAADM/wJaDqQU7IdU/s320/7.png" alt="" id="BLOGGER_PHOTO_ID_5537431045729602018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 5-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this step I am just increasing the font size of textblock so that output is properly visible to the user.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ArbE00KmXSQ/TNjoVfXs1rI/AAAAAAAAADU/hBORsHkB7OI/s1600/8.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/TNjoVfXs1rI/AAAAAAAAADU/hBORsHkB7OI/s320/8.png" alt="" id="BLOGGER_PHOTO_ID_5537431197747828402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Step 6-&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now press F5 to run your application and you will get a screen as shown in below screenshot. This is known as emulator. In your Visual Studio you can see 1 dropdown just below menubar which gives you options as Windows Phone 7 Emulator or Windows Phone 7 Device. If you have actually device you can connect it to your machine and run this application directly on your device. If you don’t have a device not to worry we have Emulator. You can run your application on Emulator by choosing Windows Phone 7 Emulator in that dropdown. Now back to your application running on emulator. You can see the UI which you had designed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjocxgvsmI/AAAAAAAAADc/O8OvnpZ4LEc/s1600/9.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 170px; height: 320px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjocxgvsmI/AAAAAAAAADc/O8OvnpZ4LEc/s320/9.png" alt="" id="BLOGGER_PHOTO_ID_5537431322876686946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once user clicks on textbox a keyboard will be popped up from below. If your machine has touch screen you can actually do typing by touching screen and get actual feel of device. If you don’t have touch screen to your machine simply click using mouse on the particular characters which you want to insert in textbox.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjokK9sb4I/AAAAAAAAADk/PBtJPJ_sPD8/s1600/10.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 171px; height: 320px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjokK9sb4I/AAAAAAAAADk/PBtJPJ_sPD8/s320/10.png" alt="" id="BLOGGER_PHOTO_ID_5537431449968078722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjop26T84I/AAAAAAAAADs/_HSn935N4-U/s1600/11.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 170px; height: 320px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjop26T84I/AAAAAAAAADs/_HSn935N4-U/s320/11.PNG" alt="" id="BLOGGER_PHOTO_ID_5537431547664397186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once it’s done click on button and you will get your output below. You can see the output in below screenshot.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjoxuUKiuI/AAAAAAAAAD0/a4IQB35I7CQ/s1600/12.PNG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 170px; height: 320px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/TNjoxuUKiuI/AAAAAAAAAD0/a4IQB35I7CQ/s320/12.PNG" alt="" id="BLOGGER_PHOTO_ID_5537431682795866850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That’s it!!! Your application is ready!!!&lt;br /&gt;I will be back soon with more bogs on Windows Phone 7. Till that time. Good bye :-)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-167852595037817849?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/167852595037817849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/windows-phone-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/167852595037817849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/167852595037817849'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/windows-phone-7.html' title='Windows Phone 7'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ArbE00KmXSQ/TNjnH4wXFrI/AAAAAAAAACc/fcWQVPUZSXY/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-9008315244322894415</id><published>2010-11-06T11:30:00.000+05:30</published><updated>2010-11-06T11:30:18.739+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><category scheme='http://www.blogger.com/atom/ns#' term='WP7'/><title type='text'>Windows Phone 7 Marketplace Open to All</title><content type='html'>&lt;p&gt;Microsoft opened the marketplace submission for all developers on 5th November, 2010. You can learn more about it here - &lt;a title="http://create.msdn.com/en-US/" href="http://create.msdn.com/en-US/"&gt;http://create.msdn.com/en-US/&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-9008315244322894415?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/9008315244322894415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/11/windows-phone-7-marketplace-open-to-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/9008315244322894415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/9008315244322894415'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/11/windows-phone-7-marketplace-open-to-all.html' title='Windows Phone 7 Marketplace Open to All'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4145291809051845614</id><published>2010-10-15T11:14:00.000+05:30</published><updated>2010-10-15T11:15:27.309+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='training'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Training in VIIT College</title><content type='html'>A 2 days workshop on .NET was held in Vishwakarma Institute of Information Technology (VIIT) College on 5-6 October 2010. This was on intercollegiate level and was supported by Microsoft. Almost 150 students from different colleges all over Pune attended this workshop. Students from FE-BE attended it. Workshop included basics of .Net, ADO.Net, ASP.Net, Cloud Computing, Windows Phone 7 etc. We also conducted practicals mainly on basics of .Net and also on ASP.Net and ADO.Net. Was a challenging job as FE and SE students were blank about all these things and had to make them understand each and everything including logic. But overall nice workshop. And being alumni of this college was nice experience to take training in same college.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4145291809051845614?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4145291809051845614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/10/training-in-viit-college.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4145291809051845614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4145291809051845614'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/10/training-in-viit-college.html' title='&lt;strong&gt;Training in VIIT College&lt;/strong&gt;'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7569553353852733518</id><published>2010-10-15T10:46:00.000+05:30</published><updated>2010-10-15T11:00:34.093+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pune University'/><category scheme='http://www.blogger.com/atom/ns#' term='training'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net'/><title type='text'>Training in Indira College</title><content type='html'>A 2 days workshop on VB.NET was held in Indira College on 21-22 August 2010. This was held by Pune University for professors of TY BCA (Pune University). There were almost 40 professors from different colleges all over Pune. Workshop included basics of .Net, ADO.Net, etc. We also conducted practicals which were conducted by me. I performed all practicals which were included in their syllabus. Was a nice experience.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7569553353852733518?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7569553353852733518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/10/training-in-indira-college.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7569553353852733518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7569553353852733518'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/10/training-in-indira-college.html' title='&lt;strong&gt;Training in Indira College&lt;/strong&gt;'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-6309701009727902099</id><published>2010-07-23T18:51:00.000+05:30</published><updated>2010-07-23T18:53:00.383+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Pune'/><category scheme='http://www.blogger.com/atom/ns#' term='CTD'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Microsoft’s CTD Developer event, Pune</title><content type='html'>Microsoft’s Community Tech Days was held in Pune on 17th July 2010. It was another successful event in Pune volunteered by Pune User Group (PUG) members. Keynote was given by Mr. Daniel. Next sessions were presented by Vivek Venkatesh on Programming in right way, an exciting session on Windows Phone 7 by Mayur Tendulkar, Expression Blend 4 by Pravinkumar Dabade. Last session was given by me on Visual Studio Tools for Office (VSTO). I presented introductory session on VSTO. It included theory part also with 6-7 demos which included excel, word, outlook demos. Almost 80-90 people attended event. In all nice event!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-6309701009727902099?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/6309701009727902099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/07/microsofts-ctd-developer-event-pune.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6309701009727902099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6309701009727902099'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/07/microsofts-ctd-developer-event-pune.html' title='&lt;strong&gt;Microsoft’s CTD Developer event, Pune&lt;/strong&gt;'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-6379790890417962020</id><published>2010-05-27T00:05:00.000+05:30</published><updated>2010-05-27T12:56:21.233+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='polyline'/><category scheme='http://www.blogger.com/atom/ns#' term='Bing Maps'/><category scheme='http://www.blogger.com/atom/ns#' term='pushpin'/><title type='text'>Bing Maps Development</title><content type='html'>Hello all. I am back with another interesting blog. This blog is on Bing Maps. We all use maps to find out any location anywhere in world. Suppose I want to find out location of Pune in India how will we search? Simple! Open maps put Pune, India in its search box and it will give you location of Pune. Now when we get Pune we also get some image on map which is known as pushpin which points out the location which you have searched. Now many of you must be thinking from where we get this. But it’s very simple. We can actually code for that using Bing Maps and get it done! Let’s see few things related to Bing Maps.&lt;br /&gt;&lt;br /&gt;In this blog we will see following things related to Bing Maps:-&lt;br /&gt;1) Add Pushpin&lt;br /&gt;2) Delete Pushpin&lt;br /&gt;3) Add Polyline&lt;br /&gt;Let’s start with 1st part Add Pushpin. Before that we need to include a script to get map in our browser.&lt;br /&gt;&lt;br /&gt;&amp;lt;script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;To get map in browser we need to include following code in body part.&lt;br /&gt;&lt;br /&gt;&amp;lt;body onload="GetMap();"&amp;gt;&lt;br /&gt;&amp;lt;div id='myMap' style="position:relative; width:1350px; height:500px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Add Pushpin :-&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Lets see function for Add Pushpin.&lt;br /&gt;&lt;br /&gt;var icon = "&amp;lt;div&amp;gt;&amp;lt;img src='images/greenpushpin.png' alt='green pin' width='30px' height='30px'/&amp;gt;&amp;lt;/div&amp;gt;";&lt;br /&gt;var infobox = "&amp;lt;div style='width:309px;'&amp;gt;This is green!!! Run!!!&amp;lt;/div&amp;gt;";&lt;br /&gt;&lt;br /&gt;function AddPushpin() {&lt;br /&gt;  shape = new VEShape(VEShapeType.Pushpin, new VELatLong(19.0177, 72.8562,2272));&lt;br /&gt;       shape.SetCustomIcon(icon);&lt;br /&gt;       map.ClearInfoBoxStyles();&lt;br /&gt;       shape.SetTitle("&amp;lt;h2&amp;gt;Pin&amp;lt;/h2&amp;gt;");&lt;br /&gt;       shape.SetDescription(infobox);&lt;br /&gt;       map.AddShape(shape);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In this above function we have used method VEShape to create a shape to which we going to call pushpin. We have VEShapeType.Pushpin as its parameter to get shape pushpin on the map. VELatLong is a method which takes parameters latitude and longitude where by default that pushpin will be placed. We can also dynamically take latitude and longitude as parameters in AddPushpin() function. This will result into following,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_ArbE00KmXSQ/S_1szE0KFKI/AAAAAAAAACM/kZreFwyt1Lk/s1600/bing.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 180px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5475652346674025634" border="0" alt="" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/S_1szE0KFKI/AAAAAAAAACM/kZreFwyt1Lk/s320/bing.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We can see in this image above the result of AddPushpin(). We can see a spot marked in red which is pushpin of red color which is place on location Pune.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Delete Pushpin :-&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Next we will see DeletePushpin.&lt;br /&gt;&lt;br /&gt;function DeletePushpin() {&lt;br /&gt;if (shape)&lt;br /&gt;map.DeleteShape(shape);&lt;br /&gt;shape = null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This code is used to delete pushpin from Bing Maps. We have a specific function DeleteShape() to delete pushpins where we can call the shape which we had added using AddPushpin() and then set that shape to null.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) Add Polyline :-&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Lets now see how to add polylines. First we will see how to add button in body part clicking on which we can start adding polylines. For that we need to write following code,&lt;br /&gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;input type="button" id="cmdDraw" value="Click to begin drawing" onclick="startDrawing();" /&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;Drawing Mode: &amp;lt;span id="ModeIndicator"&amp;gt;Disabled&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;var polyline = null;&lt;br /&gt;var polylineMask = null;&lt;br /&gt;var points = new Array();&lt;br /&gt;var maskPoints = new Array(new VELatLong(0, 0), new VELatLong(0, 0));&lt;br /&gt;var drawing = false;&lt;br /&gt;&lt;br /&gt;function GetMap()&lt;br /&gt;{&lt;br /&gt;map = new VEMap('myMap');&lt;br /&gt;map.LoadMap(new VELatLong(19.0177, 72.8562), 5, false);&lt;br /&gt;polylineMask = new VEShape(VEShapeType.Polyline, maskPoints);&lt;br /&gt;polylineMask.HideIcon();&lt;br /&gt;polylineMask.Hide();&lt;br /&gt;polylineMask.SetLineColor(new VEColor(0, 0, 255, 0.5));&lt;br /&gt;polylineMask.Primitives[0].symbol.stroke_dashstyle = "Dash";&lt;br /&gt;map.AddShape(polylineMask);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;map.AttachEvent("onmousedown", mouseDownHandler);&lt;br /&gt;map.AttachEvent("onmousemove", mouseMoveHandler);&lt;br /&gt;map.AttachEvent("onkeypress", keyPressHandler);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function startDrawing() {&lt;br /&gt;if (polyline &amp;amp;&amp;amp; !drawing) {&lt;br /&gt;map.DeleteShape(polyline);&lt;br /&gt;polyline = null;&lt;br /&gt;points.length = 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;map.vemapcontrol.EnableGeoCommunity(true);&lt;br /&gt;drawing = true;&lt;br /&gt;document.getElementById("ModeIndicator").innerHTML = 'Enabled';&lt;br /&gt;document.getElementById("cmdDraw").value = 'Press ESC to exit drawing mode';&lt;br /&gt;document.getElementById("cmdDraw").disabled = true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mouseMoveHandler(e) {&lt;br /&gt;if (drawing) {&lt;br /&gt;var loc = map.PixelToLatLong(new VEPixel(e.mapX, e.mapY));&lt;br /&gt;if (points.length &gt; 0) { polylineMask.Show() };&lt;br /&gt;maskPoints[1] = loc&lt;br /&gt;polylineMask.SetPoints(maskPoints);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mouseDownHandler(e) {&lt;br /&gt;if (drawing) {&lt;br /&gt;currentLatLon = map.PixelToLatLong(new VEPixel(e.mapX, e.mapY));&lt;br /&gt;points.push(currentLatLon);&lt;br /&gt;maskPoints[0] = currentLatLon;&lt;br /&gt;&lt;br /&gt;if (points.length &gt; 1) {&lt;br /&gt;if (!polyline) {&lt;br /&gt;polyline = new VEShape(VEShapeType.Polyline, points);&lt;br /&gt;polyline.HideIcon();&lt;br /&gt;map.AddShape(polyline);&lt;br /&gt;&lt;br /&gt;maskPoints[1] = currentLatLon&lt;br /&gt;} else {&lt;br /&gt;polyline.SetPoints(points);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function keyPressHandler(e) {&lt;br /&gt;if (drawing &amp;amp;&amp;amp; e.keyCode == 27) {&lt;br /&gt;drawing = false;&lt;br /&gt;map.vemapcontrol.EnableGeoCommunity(false);&lt;br /&gt;document.getElementById("ModeIndicator").innerHTML = 'Disabled';&lt;br /&gt;document.getElementById("cmdDraw").value = 'Click to begin drawing';&lt;br /&gt;document.getElementById("cmdDraw").disabled = false;&lt;br /&gt;polylineMask.Hide();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the above code we have given user his choice to choose locations and draw polyline. We have used a button on clicking of which user can start drawing polygon and once it press ESC button on keyboard he will stop drawing polygon. For drawing polyline we have set line width, its color etc using a method VEColor. For drawing polylines we have used mousehandlers and keypress handler events. We have used mousehandlers for clicking on location and start drawing polyline and keypresshandler to use ESC button once polylines drawing is finished. To check whether drawing is finished and user has pressed escaped or not we have used a boolean variable drawing.&lt;br /&gt;&lt;br /&gt;Result we can show in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/abebAEF-Mhg&amp;amp;hl=hi&amp;amp;fs=1"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/abebAEF-Mhg&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This way we can add pushpins, delete pushpins and draw polylines.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-6379790890417962020?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/6379790890417962020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/05/bing-maps-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6379790890417962020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6379790890417962020'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/05/bing-maps-development.html' title='Bing Maps Development'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ArbE00KmXSQ/S_1szE0KFKI/AAAAAAAAACM/kZreFwyt1Lk/s72-c/bing.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7740801037385379429</id><published>2010-05-03T22:26:00.000+05:30</published><updated>2010-05-03T22:28:30.071+05:30</updated><title type='text'>Microsoft TechEd 2010 Bangalore, India</title><content type='html'>Microsoft’s biggest event in India, TechEd, was held on 12-13-14 April 2010 in Bangalore. It was held in Lalit Hotel. Almost 2000-2500 people attended this event. I also got a chance to attend this event. Many dignitaries like S.Somasegar, Moorti Uppaluri, Stephanie Saad Cuthbertson, Sanjay Vyaas etc gave keynotes and sessions. It was in all a 3-day event which included 7 parallel tracks. All technologies for developers and IT Professionals was covered in this event.&lt;br /&gt;On 1st day after registrations, event started at 9:30 am with a welcome note of Mr. Moorthy Uppaluri which was continued by S.Somasegar with keynote and Visual Studio 2010. Launch of Visual Studio 2010 was a prime attraction of this event. Everyone was interested to know new features of Visual Studio 2010 which was shown by Stephanie Saad Cuthbertson and Paula Willis through interesting demos. Other sessions included ASP.Net, Cloud Computing, VS 10 programming, securing infrastructure etc.&lt;br /&gt;On 2nd day interesting sessions for me were Windows 7 phone development track. Awesome demos were showed by Mr. Vivek Dalvi. We also had sessions on Windows 7, Sharepoint 2010, Office 2010. Architect’s track included session like Concept Visualization by Mr. Sanjay Vyaas.&lt;br /&gt;On 3rd day there were individual tracks for Sharepoint Development, Azure, RIA (Silverlight) etc. Speakers like Mr. Nitin Paranjape, Mr. Raj Choudhary, Mr. Harish Ranganathan etc had their sessions on 3rd day.&lt;br /&gt;We also had Demo Extravaganza everyday after all sessions concluded. In this section many people got chance to show their talent. One of the most amazing demo was Buddy Home and Robo war and dance demonstrated by Ramaprasanna Chellamuthu. Also 2 college boys demonstrated their project of philontrophy which was one more amazing demo. There was another special section called Community track in which MVPs, Industry Experts gave sessions which were very deep technically and also were very understanding. For e.g. Mr. Dhaval Faria gave a session on F#. We had another section called Hands on which helped people to get practical knowledge of technologies. Event also included a Partner stalls in which parteners like Accenture, Telerik, Sapient etc had put their stalls. Many goodies were distributed there like tshirts, cds etc. We also had MTv VJ Mr. Nikhil Chinappa attending the event.&lt;br /&gt;We really had a nice time enjoying this event.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7740801037385379429?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7740801037385379429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/05/microsoft-teched-2010-bangalore-india.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7740801037385379429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7740801037385379429'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/05/microsoft-teched-2010-bangalore-india.html' title='Microsoft TechEd 2010 Bangalore, India'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-1027330211375135476</id><published>2010-03-22T23:10:00.000+05:30</published><updated>2010-03-22T23:13:32.812+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Animation'/><title type='text'>Animation in WPF</title><content type='html'>In WPF, we have 3 types of animations:&lt;br /&gt;1) Color Animation – Used to change the color of the control.&lt;br /&gt;2) Double Animation – Used to animate double values such as X/Y coordinate, Width and Height etc.&lt;br /&gt;3) Key Frame Animation – This is a complex animation than color and double animation. In this animation we use key frames or a series of key frames.&lt;br /&gt;&lt;br /&gt;Above we have seen just 1 line introduction of all types. We will learn more about them below along with their examples.&lt;br /&gt;&lt;br /&gt;We all know that we have to write animation part in “Storyboard”. To begin storyboard we need to do “&amp;lt;BeginStoryBoard&amp;gt;”. It has two main properties – “TargetName” and “TargetProperty”. “TargetName” identifies the pbject and “TargetProperty” identifies the property of that oject. If we want to begin animation on some event like button click etc we can use “EventTrigger”. In animation there are two things – “To” and “From”. “To” specifies the start of animation and “From” specifies the end of animation. “TimeSpan” is 1 more keyword which specifies the time span for how much animation should run. These are few basic keywords which are necessary in our coding part for animation. We might come across few more keywords which I will explain them as they are used.&lt;br /&gt;Now let’s start with examples of animations.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Color Animation: &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Window x:Class="WpfApplication1.MainWindow"&lt;br /&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;Title="MainWindow" Height="350" Width="525"&amp;gt;&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="38" HorizontalAlignment="Left" Margin="133,156,0,0" x:Name="Rectchangecolor" Stroke="Black" Fill="Yellow" VerticalAlignment="Top" Width="200"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger RoutedEvent="Rectangle.MouseLeftButtonDown"&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;Storyboard&amp;gt;&lt;br /&gt;&amp;lt;ColorAnimation Storyboard.TargetName="Rectchangecolor"&lt;br /&gt;Storyboard.TargetProperty="Fill.Color"&lt;br /&gt;From="Yellow"&lt;br /&gt;To="DarkBlue"&lt;br /&gt;Duration="0:0:1"&amp;gt;&lt;br /&gt;&amp;lt;/ColorAnimation&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Window&amp;gt;&lt;br /&gt;&lt;br /&gt;Above is the code of color animation. In this example, we have a rectangle which is of yellow color which changes to blue color in time span of 1 second. In above code we have declared a rectangle which is already filled with yellow color. We have declared event on it as “MouseLeftButtonDown”. If we left single click on rectangle, animation will start. Now this animation we have declared below in StoryBoard in Color Animation. For this we have given TargetName the name of rectangle as that is our target for animation and TargetProperty we have declared as Fill.Color which fills the target with given color. Here we have also declared which color to fill which is blue. We have given duration as 0:0:1 which is 1 sec.&lt;br /&gt;&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/wf4ilAM0OTA&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/wf4ilAM0OTA&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Double Animation:&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&amp;lt;Window x:Class="WpfApplication1.MainWindow"&lt;br /&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;Title="MainWindow" Height="350" Width="525"&amp;gt;&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="38" HorizontalAlignment="Left" Margin="133,156,0,0" x:Name="Rectchangecolor" Stroke="Black" Fill="Red" VerticalAlignment="Top" Width="200"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger RoutedEvent="Rectangle.MouseLeftButtonDown"&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;Storyboard&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimation Storyboard.TargetName="Rectchangecolor"&lt;br /&gt;Storyboard.TargetProperty="Height"&lt;br /&gt;From="38"&lt;br /&gt;To="100"&lt;br /&gt;Duration="0:0:1.5"&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimation&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimation Storyboard.TargetName="Rectchangecolor"&lt;br /&gt;Storyboard.TargetProperty="Width"&lt;br /&gt;From="200"&lt;br /&gt;To="350"&lt;br /&gt;Duration="0:0:3"&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimation&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Window&amp;gt;&lt;br /&gt;&lt;br /&gt;Above is the code of double animation. In this example, we have a rectangle which is of red color of height 38 and width 200 which changes to height 100 in time span of 1.5 second and width 350. We have declared event on it as “MouseLeftButtonDown”. If we left single click on rectangle, animation will start. Now this animation we have declared below in StoryBoard in Double Animation. For this we have given TargetName the name of rectangle as that is our target for animation and TargetProperty we have declared as Height for change in height and Width for change in width.&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/R25WPqvysFI&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/R25WPqvysFI&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Let’s see 1 more example of Double Animation in which we will write animation part in code.&lt;br /&gt;&lt;br /&gt;In XAML you will have to write,&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Button Content="Animate" Height="33" HorizontalAlignment="Left" Margin="32,12,0,0" Name="btnRotate" VerticalAlignment="Top" Width="165" Click="btnRotate_Click" /&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="200" HorizontalAlignment="Left" Margin="534,158,0,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Width="50" Fill="#FF166C0F" /&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Fill="#FF166C0F" Height="50" HorizontalAlignment="Left" Margin="457,235,0,0" Name="rectangle2" Stroke="Black" VerticalAlignment="Top" Width="200" /&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&lt;br /&gt;In code we need to write,&lt;br /&gt;&lt;br /&gt;namespace WpfApplication1&lt;br /&gt;{&lt;br /&gt;/// &amp;lt;summary&amp;gt;&lt;br /&gt;/// Interaction logic for MainWindow.xaml&lt;br /&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;public partial class MainWindow : Window&lt;br /&gt;{&lt;br /&gt;public MainWindow()&lt;br /&gt;{&lt;br /&gt;InitializeComponent();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void btnRotate_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;DoubleAnimation da =new DoubleAnimation();&lt;br /&gt;da.From = 0;&lt;br /&gt;da.To = 90;&lt;br /&gt;da.Duration = new Duration(TimeSpan.FromSeconds(3));&lt;br /&gt;DoubleAnimation da1 = new DoubleAnimation();&lt;br /&gt;da1.From = 0;&lt;br /&gt;da1.To = -90;&lt;br /&gt;da1.Duration = new Duration(TimeSpan.FromSeconds(3));&lt;br /&gt;//da.RepeatBehavior = RepeatBehavior.Forever;&lt;br /&gt;RotateTransform rt = new RotateTransform();&lt;br /&gt;rectangle1.RenderTransform = rt;&lt;br /&gt;rt.BeginAnimation(RotateTransform.AngleProperty, da);&lt;br /&gt;RotateTransform rt1 = new RotateTransform();&lt;br /&gt;rectangle2.RenderTransform = rt1;&lt;br /&gt;rt1.BeginAnimation(RotateTransform.AngleProperty, da1);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Here we have taken two similar rectangles. We have given angle property to each of them. To 1 rectangle we have given angle 90 and to other we have given angle -90 due to which both rectangle animate in opposite direction. We have included animation in the code. For writing this in our code we need to include namespace using System.Windows.Media.Animation.&lt;br /&gt;&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/_ggXNTXsXuU&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/_ggXNTXsXuU&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;We can also have a combination of Color and Double Animation.&lt;br /&gt;&amp;lt;Window x:Class="WpfApplication1.MainWindow"&lt;br /&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;Title="MainWindow" Height="433" Width="803"&amp;gt;&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Button Content="Animate" Height="33" HorizontalAlignment="Left" Margin="32,12,0,0" Name="btnRotate"&lt;br /&gt;VerticalAlignment="Top" Width="165"/&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="200" HorizontalAlignment="Left" Margin="534,158,0,0" Name="rectangle1"&lt;br /&gt;Stroke="Black" VerticalAlignment="Top" Width="50" Fill="DarkGreen"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;RotateTransform x:Name="TransRotate1"&lt;br /&gt;CenterX="25" CenterY="25" Angle="0" /&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Resources&amp;gt;&lt;br /&gt;&amp;lt;Storyboard x:Key="spin1"&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimation Storyboard.TargetName="TransRotate1"&lt;br /&gt;Storyboard.TargetProperty="Angle"&lt;br /&gt;By="90"&lt;br /&gt;Duration="0:0:10"&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimation&amp;gt;&lt;br /&gt;&amp;lt;ColorAnimation Storyboard.TargetName="rectangle1"&lt;br /&gt;Storyboard.TargetProperty="Fill.Color"&lt;br /&gt;From="DarkGreen"&lt;br /&gt;To="Red"&lt;br /&gt;Duration="0:0:15"&amp;gt;&lt;br /&gt;&amp;lt;/ColorAnimation&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Resources&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Fill="DarkGreen" Height="50" HorizontalAlignment="Left" Margin="457,235,0,0" Name="rectangle2"&lt;br /&gt;Stroke="Black" VerticalAlignment="Top" Width="200"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;RotateTransform x:Name="TransRotate2"&lt;br /&gt;CenterX="25" CenterY="25" Angle="0" /&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Resources&amp;gt;&lt;br /&gt;&amp;lt;Storyboard x:Key="spin2"&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimation Storyboard.TargetName="TransRotate2"&lt;br /&gt;Storyboard.TargetProperty="Angle"&lt;br /&gt;By="-90"&lt;br /&gt;Duration="0:0:10"&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimation&amp;gt;&lt;br /&gt;&amp;lt;ColorAnimation Storyboard.TargetName="rectangle2"&lt;br /&gt;Storyboard.TargetProperty="Fill.Color"&lt;br /&gt;From="DarkGreen"&lt;br /&gt;To="DarkBlue"&lt;br /&gt;Duration="0:0:15"&amp;gt;&lt;br /&gt;&amp;lt;/ColorAnimation&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Resources&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Window&amp;gt;&lt;br /&gt;&lt;br /&gt;Here we have taken the combination of color and double animation. We have considered the same above example for this. Here as time passes and angle changes the color of rectangle also changes.&lt;br /&gt;&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/450MqEuM-1s&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/450MqEuM-1s&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) KeyFrame Animation:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Window x:Class="WpfApplication1.MainWindow"&lt;br /&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;Title="MainWindow" Height="433" Width="803"&amp;gt;&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="38" HorizontalAlignment="Left" Margin="133,156,0,0" x:Name="Rect" Stroke="Black" Fill="DarkGreen" VerticalAlignment="Top" Width="200"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;TranslateTransform x:Name="RectTrans" X="0" Y="0" /&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger RoutedEvent="Rectangle.MouseLeftButtonDown"&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;Storyboard&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="RectTrans"&lt;br /&gt;Storyboard.TargetProperty="X"&lt;br /&gt;Duration="0:0:15"&amp;gt;&lt;br /&gt;&amp;lt;LinearDoubleKeyFrame Value="350" KeyTime="0:0:7" /&amp;gt;&lt;br /&gt;&amp;lt;LinearDoubleKeyFrame Value="50" KeyTime="0:0:5" /&amp;gt;&lt;br /&gt;&amp;lt;LinearDoubleKeyFrame Value="200" KeyTime="0:0:3" /&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimationUsingKeyFrames&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Window&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here we have taken a rectangle. It uses key frames to change the animation. Here we are using X value. We have changed it from 0 to 350 back to 50 and again to 200. We have used Linear key frame so it moves in Linear Fashion.&lt;br /&gt;&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/mj0n3Pqyp_s&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/mj0n3Pqyp_s&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Similarly we can do using spline double key frames as follows.&lt;br /&gt;&lt;br /&gt;&amp;lt;Window x:Class="WpfApplication1.MainWindow"&lt;br /&gt;xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;Title="MainWindow" Height="433" Width="803"&amp;gt;&lt;br /&gt;&amp;lt;Grid&amp;gt;&lt;br /&gt;&amp;lt;Rectangle Height="38" HorizontalAlignment="Left" Margin="133,156,0,0" x:Name="Rect" Stroke="Black" Fill="DarkGreen" VerticalAlignment="Top" Width="200"&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;TranslateTransform x:Name="SplineTestTrans" X="0" Y="0" /&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.RenderTransform&amp;gt;&lt;br /&gt;&amp;lt;Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger RoutedEvent="Rectangle.MouseLeftButtonDown"&amp;gt;&lt;br /&gt;&amp;lt;EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;Storyboard&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="SplineTestTrans"&lt;br /&gt;Storyboard.TargetProperty="X"&lt;br /&gt;Duration="0:0:15"&amp;gt;&lt;br /&gt;&amp;lt;SplineDoubleKeyFrame Value="350" KeyTime="0:0:7" KeySpline="0.0,1.0, 1.0,0.0" /&amp;gt;&lt;br /&gt;&amp;lt;SplineDoubleKeyFrame Value="0" KeyTime="0:0:8" KeySpline="0.25,0.5, 0.5,0.75" /&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimationUsingKeyFrames&amp;gt;&lt;br /&gt;&amp;lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName="SplineTestTrans"&lt;br /&gt;Storyboard.TargetProperty="Y"&lt;br /&gt;Duration="0:0:15"&amp;gt;&lt;br /&gt;&amp;lt;SplineDoubleKeyFrame Value="350" KeyTime="0:0:7" KeySpline="0.0,1.0, 1.0,0.0" /&amp;gt;&lt;br /&gt;&amp;lt;SplineDoubleKeyFrame Value="0" KeyTime="0:0:8" KeySpline="0.25,0.5, 0.5,0.75" /&amp;gt;&lt;br /&gt;&amp;lt;/DoubleAnimationUsingKeyFrames&amp;gt;&lt;br /&gt;&amp;lt;/Storyboard&amp;gt;&lt;br /&gt;&amp;lt;/BeginStoryboard&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger.Actions&amp;gt;&lt;br /&gt;&amp;lt;/EventTrigger&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle.Triggers&amp;gt;&lt;br /&gt;&amp;lt;/Rectangle&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Window&amp;gt;&lt;br /&gt;&lt;br /&gt;Here we have used spline double key frames using which we can animate in any way.&lt;br /&gt;So after writing this code we will get the output as shown in below video.&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/JEnSjGyCifE&amp;hl=hi&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/JEnSjGyCifE&amp;hl=hi&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-1027330211375135476?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/1027330211375135476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/03/animation-in-wpf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/1027330211375135476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/1027330211375135476'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/03/animation-in-wpf.html' title='Animation in WPF'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3747827530152680935</id><published>2010-03-01T12:25:00.000+05:30</published><updated>2010-03-01T14:26:24.162+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Report'/><title type='text'>Report Writing in Windows Forms</title><content type='html'>Microsoft Report is based on report definition which is an XML file that gives us the data of a report. It may have different extensions. For eg. We can create a client-side report  definition language (*.rdlc) file using Visual Studio. Reports also include tables, aggregated and multidimensional data, charts etc as per users requirements.&lt;br /&gt;&lt;br /&gt;Let us see a example of creating a report. In this we will have a table in our report which will shoe us details of students like name,roll no etc.. Lets start is step by step..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;br /&gt; We want to build a windows application so we will choose Windows Form Application. You can select any language you want according to your choice. May be it is VB or C#. Give it a name and move ahead by clicking ok. You can check it in screenshot given below. I have named it as SampleSQLReport.&lt;br /&gt;&lt;br /&gt; &lt;a href="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tlk3hNAMI/AAAAAAAAAAM/sxFD8UDtXHU/s1600-h/1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tlk3hNAMI/AAAAAAAAAAM/sxFD8UDtXHU/s320/1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443556258660286658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; &lt;br /&gt;After creating Windows Form Application we will get a form which will be completely blank. Now we will ask user to enter his name who wants to generate a report. For this we will need a label on which we will ask user to enter name, then a textbox in which user will enter their name, and last a button on clicking of which will generate a report. We can also increase form size by going into its properties and changing size of it. All these things are shown in screenshot below.  &lt;br /&gt; &lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tl-h_mMFI/AAAAAAAAAAU/o6vUmB4tfSo/s1600-h/2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tl-h_mMFI/AAAAAAAAAAU/o6vUmB4tfSo/s320/2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443556699558785106" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;br /&gt;Now as we want to generate report we need to include a Microsoft ReportViewer. We can also use Crystal ReportViewer but here we will use Microsoft ReportViewer. We can get this from our toolbox which is on left side. In that we will get it from Reporting. So you can include Microsoft ReportViewer from there by dragging and dropping or by double clicking on it. You can see a report just below label, textbox etc. We can see all these things in screenshot below. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tmd6wOFRI/AAAAAAAAAAc/8Ou5hGjtKgE/s1600-h/3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tmd6wOFRI/AAAAAAAAAAc/8Ou5hGjtKgE/s320/3.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443557238781121810" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;br /&gt;After this we have to add a file named .rdlc creating report. For adding this we need to add new item  Report. Name it. Here I have given its name as rptSample.rdlc. After adding it we get this in window as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_ArbE00KmXSQ/S4tmudxJluI/AAAAAAAAAAk/cT8Gl0-0txg/s1600-h/4.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/S4tmudxJluI/AAAAAAAAAAk/cT8Gl0-0txg/s320/4.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443557523058169570" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 5:&lt;/strong&gt;&lt;br /&gt;Next thing we will do is that the textbox which we had asked on main application we will display that name on report too.. For that we need to put textbox on report too which will display name. For displaying name on this from main page textbox we need to add report parameters. We can do this by going into Report tab in above navigation bar. Report  Report Parameters. After you select this you will get a screen which is shown in below screenshot. In similar way you have to move ahead.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tow80pmcI/AAAAAAAAAA8/9olHscXRQ24/s1600-h/5.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tow80pmcI/AAAAAAAAAA8/9olHscXRQ24/s320/5.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443559764777343426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In above screenshot you can see we have added parameters. I have given its name as paraName. Similarly you can add your parameters.&lt;br /&gt;&lt;br /&gt;In below screenshot we can see how to add parameters to textboxes so that its value gets displayed in textbox.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tnIATJO-I/AAAAAAAAAA0/ZBGtRHSlBY4/s1600-h/6.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tnIATJO-I/AAAAAAAAAA0/ZBGtRHSlBY4/s320/6.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443557961824287714" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 6:&lt;/strong&gt;&lt;br /&gt;As we see above we have to select (Category) Parameters  (Item) All  (Parameter) parameter name which you have declared before in your code. Then after clicking ok you will get below screen.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tpSsaB6dI/AAAAAAAAABE/26LbbsYidJQ/s1600-h/7.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tpSsaB6dI/AAAAAAAAABE/26LbbsYidJQ/s320/7.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443560344486275538" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Till what we have done, its code is given in below screenshot.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_ArbE00KmXSQ/S4tprdOxosI/AAAAAAAAABM/zRqq9sGHBdw/s1600-h/8.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://4.bp.blogspot.com/_ArbE00KmXSQ/S4tprdOxosI/AAAAAAAAABM/zRqq9sGHBdw/s320/8.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443560769909269186" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Till what we have done lets run it. So that we will get to know whether wat we did atleast till that point how its working. So after running you get this.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tp2TpmqSI/AAAAAAAAABU/DEzvMhNFItM/s1600-h/9.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tp2TpmqSI/AAAAAAAAABU/DEzvMhNFItM/s320/9.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443560956316002594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 7:&lt;/strong&gt;&lt;br /&gt;Now lets move ahead with database part as we want to display Student database in a tabular format in our report. So for that will add annother class in code which will include Student table format. We can see the code in below screenshot.&lt;br /&gt; &lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tqAfGIRVI/AAAAAAAAABc/qvCF6C21tSo/s1600-h/10.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tqAfGIRVI/AAAAAAAAABc/qvCF6C21tSo/s320/10.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443561131187127634" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In above code DataTable Student is created with rows like rollno,name,div,marks and those columns are added in columns. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 8:&lt;/strong&gt;&lt;br /&gt;Now we have created DataTable but we need to add DataSource also to this. For that we have an option on left hand named data source. When you click on that we get an option Add New Data Source. After clicking on that we get screen as shown below and in that we have to choose object.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tqPzvekYI/AAAAAAAAABk/3fBALNi6J9M/s1600-h/11.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tqPzvekYI/AAAAAAAAABk/3fBALNi6J9M/s320/11.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443561394427302274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After selecting object click Next. After that you will get screen as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tqgOoDOAI/AAAAAAAAABs/Dhpk0zBEraM/s1600-h/12.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4tqgOoDOAI/AAAAAAAAABs/Dhpk0zBEraM/s320/12.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443561676521814018" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 9:&lt;/strong&gt;&lt;br /&gt;In aboce screenshot you can see options in which student option is included. It’s the same table name which we have created in our code. Select that and click Next. On left side you will see table and its columns which you had added in code. Now as we want to display this in tabular format we will dragand drop Table from toolbox on right side and we will get a table in our report page. Now we can see rows and columns in that table. We will select each column from left side and drag and drop it on particular column in the table. For eg. We will drag and drop rollno column and drag and drop it on 1st column of the table. Similarly we will do of remaining rows and this way we have added columns to our table. If you want to add more columns to the table you can right click on it and you will get option Insert column to right/left. So according to your needs you can add more columns to your table. Final output of this is shown in below screenshot.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tq1UGkM4I/AAAAAAAAAB0/ESFhFj5TJBI/s1600-h/13.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://3.bp.blogspot.com/_ArbE00KmXSQ/S4tq1UGkM4I/AAAAAAAAAB0/ESFhFj5TJBI/s320/13.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443562038769234818" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 10:&lt;/strong&gt;&lt;br /&gt;Now we have to add some data in Student table. We will have to add this in code itself. For that we have to write code written in below screenshot marked in red.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4trAb9bjMI/AAAAAAAAAB8/cAe4Kj-ojTM/s1600-h/14.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_ArbE00KmXSQ/S4trAb9bjMI/AAAAAAAAAB8/cAe4Kj-ojTM/s320/14.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443562229856963778" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Final Output:&lt;br /&gt;After adding this data our work is finished. Now we will run our project and we will get output as shown in screenshot below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4trN_C4nQI/AAAAAAAAACE/wS188lx0jGE/s1600-h/15.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 180px;" src="http://1.bp.blogspot.com/_ArbE00KmXSQ/S4trN_C4nQI/AAAAAAAAACE/wS188lx0jGE/s320/15.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5443562462613380354" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So in this way you can create your reports.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3747827530152680935?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3747827530152680935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/02/microsoft-report-is-based-on-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3747827530152680935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3747827530152680935'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/02/microsoft-report-is-based-on-report.html' title='Report Writing in Windows Forms'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ArbE00KmXSQ/S4tlk3hNAMI/AAAAAAAAAAM/sxFD8UDtXHU/s72-c/1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4364177563481032871</id><published>2010-02-03T00:53:00.000+05:30</published><updated>2010-02-03T10:17:19.874+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.Net'/><title type='text'>JQuery in ASP.Net</title><content type='html'>Let’s see using JQuery in ASP.Net in this blog. We will see few examples for use of JQuery in ASP.Net.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Displaying an alert on Button click: -&lt;br /&gt;&lt;/strong&gt;Consider a button in our code.&lt;br /&gt;&amp;lt;asp: Button ID =”Button” runat=”server” Text=”Show” /&amp;gt;&lt;br /&gt;Now once document is loaded we want to perform some action. We will tell browser to do that action using JQuery. For that we need to write a piece of code which is give below. Consider that we want to get an alert saying Welcome then we will write as following in code.&lt;br /&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;br /&gt;$(document).ready(function() {&lt;br /&gt;$(“#Button1”).click(function() {&lt;br /&gt;alert(“Welcome!”); }) ;&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;Now let’s see details of the code in JQuery.&lt;br /&gt;a) $ Sign - In JQuery, the most powerful symbol is the dollar sign. A $() function normally returns a set of objects followed by a chain of operations.&lt;br /&gt;b) Document. Ready() – In JQuery, this is the most commonly used command. It gets executed only when page gets loaded. Usually code is placed inside this block.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2)Displaying datepicker: -&lt;br /&gt;&lt;/strong&gt;We can use datepicker in ASP.Net using JQuery. For that we have to write following code.&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=text/javascript&amp;gt;&lt;br /&gt;$ (function () {&lt;br /&gt;$ (“#datepicker”). datepicker ();&lt;br /&gt;});&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;div class=demo&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Date: &amp;lt;input id=datepicker type=text&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;br /&gt;In this code we have taken a textbox as an input in which we will get date. When we click on that textbox a calendar will be opened below attached to textbox. In that calendar we have to choose a date. If you don’t want to select date you can simply press Esc to escape. If date is selected then you will see that date in your textbox.&lt;br /&gt;&lt;br /&gt;For including datepicker in your script, you need to download datepicker’s plugin for JQuery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4364177563481032871?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4364177563481032871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/02/jquery-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4364177563481032871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4364177563481032871'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/02/jquery-in-aspnet.html' title='JQuery in ASP.Net'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4773840116671338336</id><published>2010-02-01T17:22:00.000+05:30</published><updated>2010-02-01T17:33:58.511+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><title type='text'>JQuery</title><content type='html'>JQuery is a lightweight open source JavaScript Library. It supports many browsers. It allows us to elegantly and efficiently traverse through HTML elements with minimum lines of code. In few days only JQuery has become very popular JavaScript Library. Few of its characteristics are: -&lt;br /&gt;1) Light Weight&lt;br /&gt;2) Cross browser compatibility&lt;br /&gt;3) Simplicity&lt;br /&gt;&lt;br /&gt;If any code is of 10 lines with traditional JavaScript, we can write in a single line using JQuery. Many people get confused between JavaScript and JQuery. Many think they are same. But it’s not! JavaScript is language whereas JQuery is a library which is written using JavaScript. Latest version of JQuery is 1.4.1. They provide two copies of JQuery –&lt;br /&gt;1) Minified (23 kb zipped)&lt;br /&gt;2) Uncompressed (157 kb)&lt;br /&gt;&lt;br /&gt;Minified versions are used for production developments while uncompressed versions are used for debugging and reading. Out of these two, minified versions are best inspite of having large file size. You can download JQuery from &lt;a href="http://www.jquery.com/"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are many plugins available for JQuery which provide UI elements or special effects. Such plugins require very little JavaScript code but can do amazing things. Using JQuery is very simple, you should just simply add a like to the jQuery.js file in your html document.&lt;br /&gt;&lt;br /&gt;We will see more on JQuery in next blogpost.&lt;a href="http://www.jquery.com/"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4773840116671338336?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4773840116671338336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/02/jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4773840116671338336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4773840116671338336'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/02/jquery.html' title='JQuery'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-501901558209002697</id><published>2010-01-29T23:18:00.000+05:30</published><updated>2010-01-29T23:20:13.141+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='FILESTREAM'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>FILESTREAM in SQL Server 2008</title><content type='html'>&lt;strong&gt;         &lt;/strong&gt;In SQL Server many times our data type is not limited to only string and numbers. We need to store a large amount of data like documents, photos etc. in SQL Server table. SQL Server provides special data types for large volumes of data. They are known as Large object (LOB). Varbinary (MAX) is the data type that allows you to deal with large binary data. LOB type using this SQL Server Data Type is Binary Large Objects (BLOB).&lt;br /&gt;FILESTREAM integrates the SQL Server Database Engine with an NTFS file system by storing BLOB data as files on the file system. Transact-SQL statements can insert, update, query, search, and back up FILESTREAM data. To improve the performance of Database engine, FILESTREAM caches file data using NT.&lt;br /&gt;&lt;br /&gt;         There are FILESTREAM filegroups which are used to store data. This filegroup contains file system directories instead of files. These directories are known as data containers. These data containers cannot be nested.&lt;br /&gt;&lt;br /&gt;         To save file in filestream we have to use FileUpload. It uploads the file and then saves it to Filestream file.&lt;br /&gt;&lt;br /&gt;Byte [] buffer = new byte [ (int) FileUpload. FileContent. Length];&lt;br /&gt;FileUpload .FileContent. Read (buffer, 0, buffer.Length);&lt;br /&gt;&lt;br /&gt;         GET_FILESTREAM_TRANSACTION_CONTEXT is also a newly added feature in SQL Server 2008 which returns current transaction context. To use files stored in Filestream field we have to use SqlFileStream. For that we need to include System. Data. SqlTypes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-501901558209002697?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/501901558209002697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/filestream-in-sql-server-2008.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/501901558209002697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/501901558209002697'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/filestream-in-sql-server-2008.html' title='FILESTREAM in SQL Server 2008'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7609018239944574752</id><published>2010-01-29T21:56:00.000+05:30</published><updated>2010-01-29T22:25:27.888+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>SQL Server DELETE and TRUNCATE for ROW</title><content type='html'>I am currently working on a project, which requires to be synced with server database all the time, and there is lot of deletion which keeps happening, there are about 15,000+ records which gets deleted whenever synchronization is happening between server and client. I was performing DELETE statement to delete row from the table which was not required. Everything worked fine, the real problem started arrising when we were looking at the way database would act, we figured out that everytime we did deletion of 15,000+ rows, it will increase log file of database by 6.00MB. Which means within in a month database log file would increase upto 180MB, and 2190MB within in a year, and this is just regarding Deleting row.&lt;br /&gt;&lt;br /&gt;I faced challange regarding how to make sure that the log file does not increase. While going through documentation, I found one keyword called TRUNCATE. When we used TRUNCATE keyword instead of DELETE, it worked perfectly fine, and log file was not increased, and we also found a good increase in performance.&lt;br /&gt;&lt;br /&gt;Reason is that, when we use DELETE keyword it deletes row and also it keeps log of it in LOG file, but when we use TRUNCATE, it does not keep log of it, so nothing is recorded in LOG file, hence log file size does not increase. Which means that when we DELETE row(s) and we want to recover data back, we can use recover data back through log file, but when we use TRUNCATE keyword, we can not recover data back from log file.&lt;br /&gt;&lt;br /&gt;But, here is the catch, if I use TRUNCATE keyword in TRANSACTION block, it allows us to recover data back, but there is no gurante of recovering data.&lt;br /&gt;&lt;br /&gt;Sample Code:&lt;br /&gt;&lt;span style="font-size:78%;"&gt;BEGIN TRAN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;SELECT * FROM MyTable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;TRUNCATE TABLE MyTable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;SELECT * FROM MyTable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;ROLLBACK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;SELECT * FROM MyTable&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7609018239944574752?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7609018239944574752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/sql-server-delete-and-truncate-for-row.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7609018239944574752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7609018239944574752'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/sql-server-delete-and-truncate-for-row.html' title='SQL Server DELETE and TRUNCATE for ROW'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-346272808259667308</id><published>2010-01-28T14:58:00.000+05:30</published><updated>2010-01-28T15:37:31.156+05:30</updated><title type='text'>Session Modes in ASP.Net</title><content type='html'>As I have mentioned in previous blog, there are 4 session modes: -&lt;br /&gt;1) In-Proc Session Mode&lt;br /&gt;2) State Server Mode&lt;br /&gt;3) SQL Server Mode&lt;br /&gt;4) Custom&lt;br /&gt;&lt;br /&gt;We will see details of these states in this blog.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) In-Proc Session Mode: -&lt;/strong&gt;&lt;br /&gt;          This is default session mode in asp.net. In this mode session state is managed in process and if the process is recycled the state is lost. The main reason to use this mode inspite of state loss is ‘performance’. As the memory is read through process its performance increases. In web.config we have to mention Session mode and also we have to set the Timeout. &lt;br /&gt;&lt;br /&gt;&amp;lt;system.Web&amp;gt;&lt;br /&gt;&amp;lt;sessionState mode=”InProc” timeout=”30” /&amp;gt;&lt;br /&gt;&amp;lt;/system.Web&amp;gt;&lt;br /&gt;&lt;br /&gt;This Session TimeOut Setting keeps session alive for 30 minute. We can also adjust timeout in our code by writing&lt;br /&gt;&lt;br /&gt;Session.TimeOut = 30&lt;br /&gt;&lt;br /&gt;In-Proc mode is mainly useful for small websites and websites which have less number of users.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Advantages: -&lt;/strong&gt;&lt;br /&gt;1) It store Session data in memory object of current application domain. So accessing data is very fast and data is easily available.&lt;br /&gt;2) Implementation is very easy.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DisAdvantages: -&lt;/strong&gt;&lt;br /&gt;1) If the process is run again, all data is lost.&lt;br /&gt;2) Inspite of being fastest, more number of users affects performance.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) StateServer Session Mode: -&lt;/strong&gt;&lt;br /&gt;           This mode is also known as Out-proc session mode. It is independent to IIS and can also run on a separate server. It used as a Windows Service. It is managed by aspnet_state.exe. This server may run on the same system, but it can’t run inside main application domain. It has to run outside of that main application domain where your web application is running. Due to this feature even if process is restarted the session is alive.&lt;br /&gt;&lt;br /&gt;          By default”Startup Type" of ASP.NET state service is set to manual, we have to set it as  "Automatic"  startup type. By default this services listen TCP Port 42424, but we can change the port from registry editor. For State Server Setting we need have to specify the stateConnectionString. This will identify the system that is running state server. By default stateConnectionString used ip as 127.0.0.1 (localhost) and Port 42424.&lt;br /&gt;&lt;br /&gt;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;lt;sessionState mode=”StateServer” stateConnectionString=”tcpip=127.0.0.1:42424” /&amp;gt;&lt;br /&gt;&amp;lt;/system.web&amp;gt;&lt;br /&gt;&lt;br /&gt;         We can also set time to wait for the service to respond before cancelling the request. For doing that we need to add stateNetworkTimeout in above code. By default time is 10 seconds.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Advantages: -&lt;/strong&gt;&lt;br /&gt;1) Its keeps the data separate from IIS so, any Issue with IIS does not affect Session data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Disadvantages: -&lt;/strong&gt;&lt;br /&gt;1) Process is slow.&lt;br /&gt;2) State Server needs to be always running.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) SQL Server Session Mode: -&lt;/strong&gt;&lt;br /&gt;          This session mode provides us more secure and reliable Session management in asp.net. In this session mode, the Session data is serialized and stored in the SQL Server database. If we have to restart server very frequently, we can use SQL Server session mode. If we have to share sessions between two different applications, we can use SQL Server. In SQL server session mode we store data in SQL server so we need to specify database connection string in web.config. For doing this we can use sqlConnectionString attribute. The easiest way to configure SQL Server is using aspnet_regsql command. &lt;br /&gt;&lt;br /&gt;To setup SQL Server we need to take help of two sql Script.&lt;br /&gt;a) For Installing: InstallSqlState.sql&lt;br /&gt;b) For Un-Installing: UninstallSQLState.sql&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Advantages: -&lt;/strong&gt;&lt;br /&gt;1) Inspite of restarting IIS session data is not affected.&lt;br /&gt;2) It is most reliable and secure mode.&lt;br /&gt;3) It stores data centrally (i.e. in database).&lt;br /&gt;4) It can be easily used from other application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Disadvantages: -&lt;/strong&gt;&lt;br /&gt;1) Process is slow.&lt;br /&gt;2) Here session data is handled in other server so SQL server should always be running.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4) Custom Session Mode: -&lt;br /&gt;&lt;/strong&gt;            Custom session mode is the most interesting mode among all session modes. In&lt;br /&gt;custom session mode we can we have full control on everything. We can even create session ID. For creating session ID we can even write our own algorithm. For creating session ID we need to implement ISessionIDManager. By using SessionStateStoreProviderBase class we can implement custom providers which store session data.&lt;br /&gt;&lt;br /&gt;There are few methods which are called during implementation of Custom Session: -&lt;br /&gt;a) Initialize: - We can set custom provider.&lt;br /&gt;b) SetItemExpireCallback: - To set session time out.&lt;br /&gt;c) Initialize request: - It is called on any request.&lt;br /&gt;d) CreateNewStoreData: - Used to create new instance of SessionStateStoreData.&lt;br /&gt;&lt;br /&gt;We need to configure our web.config like below,&lt;br /&gt;&lt;br /&gt;&amp;lt;sessionState mode=”Custom” customProvider=”AccessProvider”&amp;gt;&lt;br /&gt;&amp;lt;providers&amp;gt;&lt;br /&gt;&amp;lt;add name=”AccessProvider” type=”CustomDataType” /&amp;gt;&lt;br /&gt;&amp;lt;/providers&amp;gt;&lt;br /&gt;&amp;lt;/sessionState&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Advantages: -&lt;/strong&gt;&lt;br /&gt;1) We can use existing tables to store session data. When we have to use old databases this mode is more useful than SQL server mode.&lt;br /&gt;2) It does not depend on IIS so even if we restart web server it does not affect session data.&lt;br /&gt;3) We can create our own algorithm for generating session ID.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Disadvantages: -&lt;br /&gt;&lt;/strong&gt;1) Process is slow.&lt;br /&gt;2) Being a low level task it needs to be handled carefully due to reason of security.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-346272808259667308?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/346272808259667308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/session-modes-in-aspnet_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/346272808259667308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/346272808259667308'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/session-modes-in-aspnet_28.html' title='Session Modes in ASP.Net'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-5025021914647289469</id><published>2010-01-25T16:20:00.000+05:30</published><updated>2010-01-25T16:32:48.566+05:30</updated><title type='text'>Session in ASP.Net</title><content type='html'>Consider a user visiting pages on an online shopping site. Now if that user has put 1 item in his cart and moved ahead 2 pay bill but suddenly he remembered that he wanted to order some other item too. So he goes back to previous page on which he has to add items to add that other item which he wanted to buy. But what he gets is the same page but the item he had selected is disappeared. Where did it go? It has got discarded. So he has to enter both items again. This is ok as he had added only 1 item but what if he would have already added 25 items? Just for adding 1 more item he had to type those previous 25 items again. Irritating? But a solution was given to this through a feature of ASP.Net. SESSION… Session is the thing in which we the previous requests are saved. So according to above example, the page on which 25 items were added will get saved in sessions so that even if he goes back his requests are retrieved. ASP.NET provides a solution for managing session information via the System.Web.SessionState namespace. This namespace describes a collection of classes used to enable storage of data specific to a single client within a Web application. Sessions can be used easily in ASP.NET with the Session object. For every client Session data store separately, means session data is stored as per client basis.&lt;br /&gt;&lt;strong&gt;Basic Advantages: -&lt;/strong&gt;&lt;br /&gt;1) It helps to maintain user states and user data.&lt;br /&gt;2) Implementation is easy.&lt;br /&gt;3) Stores every client data separately.&lt;br /&gt;4) It is secure.&lt;br /&gt;&lt;strong&gt;Basic Disadvantages: -&lt;/strong&gt;&lt;br /&gt;1) It affects performance if number of users is large as session data is stored in server memory.&lt;br /&gt;Let’s see how to store and retrieve values from sessions. In an ASP.NET page, the current session variables are exposed through the Session property of the Page object. We can interact with Session state with System.Web.SessionState.HttpSessionState class, because this provides built in Session Object with ASP.Net Pages.&lt;br /&gt;Consider we have to store userId in session. Then we have to include following in our code: -&lt;br /&gt;Session (“userId”) = txtuserId.Text&lt;br /&gt;Similarly if we have to retrieve userId from session then we have to write: -&lt;br /&gt;If Not Session (“userId”) Is Nothing Then&lt;br /&gt;lbluserId.Text = “UserId is : “ &amp;amp; Session (“userId”)&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;Each and every sessionId is identified by a unique Id which is known as SessionId. SessionId is created by Webserver when any page is requested by user. It is a 120 bit Id. The actual working between client, webserver and state provider is: -&lt;br /&gt;1) Client requests for a page and wants to store information on it.&lt;br /&gt;2) Webserver creates a secure SessionId and store data in state provider.&lt;br /&gt;3) State provider stores client data separately.&lt;br /&gt;4) When client wants to have same information again it again requests the same thing to webserver.&lt;br /&gt;5) Server takes the SessionId and pass it to State Provider.&lt;br /&gt;6) State provider sends data to Webserver based on SessionId.&lt;br /&gt;In ASP.Net there are following session modes: -&lt;br /&gt;1) InProc&lt;br /&gt;2) StateServer&lt;br /&gt;3) SQLServer&lt;br /&gt;4) Custom&lt;br /&gt;Details of these session modes will discuss in next blog.&lt;br /&gt;&lt;br /&gt;In web.config, SessionState elements used for setting the configuration of session. Some of them are Mode, Timeout, StateConnectionString, Custom provider etc. Session Event is declared in global.asax. There are two types of Session Events: -&lt;br /&gt;1) Session_Start&lt;br /&gt;2) Session_End&lt;br /&gt;When a new session initiate Session_Start event raised and Session_End event raised when a session is stopped.&lt;br /&gt;&lt;br /&gt;               Now as i mentioned in my previous blogs about cookies, in that i have mentioned that user's information is stored in cookies and in this blog I have written that user's information is stored in sessions.. Confused? Simple.. Cookies information is stored at client side in browser while Session information is stored at server side.. This is the difference between Cookies and Session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-5025021914647289469?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/5025021914647289469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/session-in-aspnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5025021914647289469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5025021914647289469'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/session-in-aspnet.html' title='Session in ASP.Net'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4164211441047718478</id><published>2010-01-24T10:26:00.000+05:30</published><updated>2010-01-24T10:31:23.395+05:30</updated><title type='text'>Writing and Reading Cookies in ASP.Net</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;           In previous blog we learned about basics of cookies. Now let’s see how we can play with these cookies. We can write, use and retrieve these cookies. For working with cookies we need following 3 classes:-&lt;br /&gt;&lt;br /&gt;1) HttpCookie: - It is used to create HTTP cookies.&lt;br /&gt;2) HttpResponse: - This is a property which is used to create and save cookies on client machine.&lt;br /&gt; 3) HttpRequest: - This property is used to retrieve values of cookies.&lt;br /&gt;&lt;br /&gt;Let’s see how to write and retrieve cookies: -&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Write cookies: -&lt;br /&gt;&lt;/strong&gt;          For writing cookies to visitor’s computer we need Response.Cookies command.&lt;br /&gt;For example: -&lt;br /&gt;If we want to write userId in cookie then we need to write in following way: -&lt;br /&gt;Response.Cookies (“userId”).Value = 1&lt;br /&gt;By above sentence we can save cookie with userId 1 to computer.&lt;br /&gt;If we want to put expiry date then we need to write in following way: -&lt;br /&gt;Response.Cookies (“userId”).Expires = DateTime.Now.AddDays (8)&lt;br /&gt;By above sentence we can put expiry date after 8 days from now. So that after 8 days that particular cookie will be discarded i.e. its validity will get over in 8 days.&lt;br /&gt;&lt;br /&gt;We can also write above code in following manner: -&lt;br /&gt;&lt;br /&gt;Dim cookie As New HttpCookie (“userId”)&lt;br /&gt;cookie.Value = 1&lt;br /&gt;cookie.Expires = DateTime.Now.AddDays (8)&lt;br /&gt;cookie. Domain = “abc.com”&lt;br /&gt;Response.Cookies. Add (cookie)&lt;br /&gt;From above code also we can save cookie.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Retrieve cookies: -&lt;/strong&gt;&lt;br /&gt;For retrieving cookies to visitor’s computer we need Request. Cookies command.&lt;br /&gt;For example: -&lt;br /&gt;Dim uId as Integer&lt;br /&gt;uId = Request. Cookies (“userId”). Value&lt;br /&gt;&lt;br /&gt;         Now you must be thinking how exactly this cookie thing works. The process starts from web server. When you request for any page, web server sends few things like cookies, content etc. to browser. Then things like cookies get saved on your computer and the page gets displayed to you. So you can say cookies are a response from web server. So we use ‘Response’ for adding cookies. Similarly we use ‘Request’ for retrieving cookies as browser is requesting for cookies to web server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4164211441047718478?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4164211441047718478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/writing-and-reading-cookies-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4164211441047718478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4164211441047718478'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/writing-and-reading-cookies-in-aspnet.html' title='Writing and Reading Cookies in ASP.Net'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-6979886245438079785</id><published>2010-01-24T00:25:00.000+05:30</published><updated>2010-01-24T00:28:18.562+05:30</updated><title type='text'>Cookies in ASP.Net</title><content type='html'>Cookies are the things used to store users’ information. For example if we want to keep a track of userIds of the visitors who have visited any site so we can get it through cookies. We can store these all things in cookies from where we can retrieve it back. Let’s take a very simple example... When you login into your any account they ask you as “Remember password” etc… What is this? It’s nothing but cookies. They store your information in cookies of course in encrypted format so that no one can edit it. Using these cookies they can retrieve your password again and again based on your userId or username. Cookies are dependent on websites and not on any particular page. Cookies are exchanged between browser and server.&lt;br /&gt;&lt;br /&gt;                  Most browsers support cookies of up to 4096 bytes. Browsers also impose limitations on how many cookies your site can store on the user's computer. Most browsers allow only 20 cookies per site; if you try to store more, the oldest cookies are discarded. Some browsers also put an absolute limit, usually 300, on the number of cookies they will accept from all sites combined.&lt;br /&gt;&lt;br /&gt;                   Cookies are created by browsers and they store the cookies sent by websites. If user doesn’t want to store the cookie, user can disable cookies. Once user disables cookies, cookies won’t get stored even if website sends it to the browsers. Way to delete all the Cookies is: - Open Internet Explorer and select the menu "Tools &gt; Internet Options", Press the button "Delete Cookies". This will delete all cookie files from your computer.&lt;br /&gt;&lt;br /&gt;Later we will check how to write and read a cookie..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-6979886245438079785?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/6979886245438079785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2010/01/cookies-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6979886245438079785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6979886245438079785'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2010/01/cookies-in-aspnet.html' title='Cookies in ASP.Net'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3384567011948056092</id><published>2009-08-27T09:47:00.000+05:30</published><updated>2009-08-27T09:56:33.421+05:30</updated><title type='text'>Image loading and saving in database in WPF using VB :-</title><content type='html'>WPF image uploading :-&lt;br /&gt;&lt;br /&gt;In many forms we need to upload an image..In WPF we have imagebox in which we can upload an image..For that code is :-&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;Button Height="23" HorizontalAlignment="Right" Margin="0,100,35,0" Name="btnBrowse" VerticalAlignment="Top" Width="75"&amp;gt;Browse&amp;lt;/Button&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Above is the code for button which will be used for browsing file path of that image.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnBrowse.Click&lt;br /&gt;Dim ofd As New OpenFileDialog&lt;br /&gt;If ofd.ShowDialog() Then&lt;br /&gt;Dim fs As New FileStream(ofd.FileName, FileMode.Open)&lt;br /&gt;Dim imgs As New ImageSourceConverter&lt;br /&gt;Dim dat(fs.Length) As Byte&lt;br /&gt;fs.Read(dat, 0, fs.Length)&lt;br /&gt;fs.Close()&lt;br /&gt;imgcompImage.SetValue(Image.SourceProperty, imgs.ConvertFromString(ofd.FileName.ToString()))&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;This code is the code which uploads image and saves it in database..For using few functions like ShowDialog() etc we need to import few namespaces as given below :-&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Imports System.Windows.Media.Animation&lt;br /&gt;Imports System.Windows.Navigation&lt;br /&gt;Imports Microsoft.Win32&lt;br /&gt;Imports System.Windows.Controls.Image&lt;br /&gt;Imports System.Windows.Media.Imaging&lt;br /&gt;Imports System.IO.MemoryStream&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;OpenFileDialog is to open a file while ShowDialog shows us the file path..SetValue function shows us the image on our page..To store image in database we read image in bytes as shown above in code and then store it in database..So now you can use image uploader in ur page..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3384567011948056092?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3384567011948056092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/08/wpf-image-uploading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3384567011948056092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3384567011948056092'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/08/wpf-image-uploading.html' title='Image loading and saving in database in WPF using VB :-'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-2751453431237863801</id><published>2009-08-25T15:38:00.000+05:30</published><updated>2009-08-25T15:51:55.387+05:30</updated><title type='text'>WPF Toolkit Datagrid</title><content type='html'>DataGrid is part of User Interface.It is used for displaying data in tabular format.It provides sorting and editing functions. For using DataGrid in WPF&lt;br /&gt;&lt;br /&gt;toolkit you have to first install WPF Toolkit. This Toolkit is open source. Datagrid is used for providing functions like create,update,delete,read on any data&lt;br /&gt;&lt;br /&gt;source.Now lets start building our own WPF Application in which we will use a Datagrid....&lt;br /&gt;&lt;br /&gt;    For installing toolkit basic requirement is .Net Framework 3.5 SP1..If you have this installed on your machine you can install WPF Toolkit..For that you will&lt;br /&gt;&lt;br /&gt;have to download WPF Toolkit (source or Binaries). You will get this here http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117&lt;br /&gt;When downloading is done run WPFToolkit.msi to install the WPFToolkit.dll and WPF Toolkit design time binaries to your Program Files folder.&lt;br /&gt;&lt;br /&gt;    When you start coding basic things which you have to do are :&lt;br /&gt;&lt;br /&gt;1) Reference WPFToolkit.dll in your project&lt;br /&gt;2) Import "Microsoft.Windows.Controls" in ur vb code.&lt;br /&gt;3) In your XAML file you will have to add a new xmlns "http://schemas.microsoft.com/wpf/2008/toolkit" at the top of XAML file. Example showing this will be given   &lt;br /&gt;&lt;br /&gt;below..&lt;br /&gt;&lt;br /&gt;    Lets take a simple example of Categories table which include columns catId (Category Id), catName (Category Name), catDesc (Category Description), parcatId&lt;br /&gt;&lt;br /&gt;(Parent Category Id) in database..From this catId is integer,catName and catDesc is string while parcatId is also integer in database but while displaying for user we&lt;br /&gt;&lt;br /&gt;want to display it in dropdown (combobox for datagrid here) which shows catName in list but gets saved as integer in database..So lets start coding...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Page x:Class="pgCategory"&lt;br /&gt;    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="509" Height="409"&lt;br /&gt;   &lt;br /&gt;    &amp;lt;Grid&amp;gt;&lt;br /&gt;    &amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/Page&amp;gt;&lt;br /&gt;&lt;br /&gt;    This is the basic part generated when you open an XAML page..&lt;br /&gt;&lt;br /&gt;   xmlns:dd="http://schemas.microsoft.com/wpf/2008/toolkit"&lt;br /&gt;   xmlns:dg="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"&lt;br /&gt;&lt;br /&gt;    These are two important things of adding references like that of toolkit without which you cant include Datagrid in your form..&lt;br /&gt;&lt;br /&gt;Now lets see datagrid part..&lt;br /&gt;&lt;br /&gt;&amp;lt;Grid.Resources&amp;gt;&lt;br /&gt;            &amp;lt;ObjectDataProvider x:Key="categoryDataProvider" ObjectType="{x:Type local:Categories}" MethodName="GetCategories"/&amp;gt;&lt;br /&gt;&amp;lt;/Grid.Resources&amp;gt;&lt;br /&gt;&lt;br /&gt;    Here ObjectDataProvider defines an instance of the above class as our data source which includes objecttype and methodname through which it gives data..&lt;br /&gt;&lt;br /&gt;&amp;lt;dg:DataGrid AlternatingRowBackground="AliceBlue"&lt;br /&gt;                     AutoGenerateColumns="False"&lt;br /&gt;                     CanUserAddRows="True"&lt;br /&gt;                     CanUserDeleteRows="True"&lt;br /&gt;                     Height="151"&lt;br /&gt;                     IsReadOnly="False"&lt;br /&gt;                     ItemsSource="{Binding Path=.}"&lt;br /&gt;                     MaxColumnWidth="500"&lt;br /&gt;                     MinColumnWidth="50"&lt;br /&gt;                     Name="pgCategoryDG"&lt;br /&gt;                     RowBackground="White"&lt;br /&gt;                     RowDetailsVisibilityMode="VisibleWhenSelected"&lt;br /&gt;                     RowHeaderWidth="25"&lt;br /&gt;                     SelectionUnit="FullRow"&lt;br /&gt;                     VerticalAlignment="Bottom"&lt;br /&gt;                     Loaded="pgCategoryDG_Loaded" MouseDoubleClick="pgCategoryDG_MouseDoubleClick"&amp;gt;&lt;br /&gt;           &lt;br /&gt;            &amp;lt;dg:DataGrid.Columns&amp;gt;&lt;br /&gt;                &amp;lt;dg:DataGridTextColumn x:Name="dgcatName" Header="Category Name" Width="100" Binding="{Binding catName}" IsReadOnly="False"/&amp;gt;&lt;br /&gt;                &amp;lt;dg:DataGridTextColumn x:Name="dgcatDesc" Header="Category Description" Width="125" Binding="{Binding catDesc}" IsReadOnly="false"/&amp;gt;&lt;br /&gt;                &amp;lt;dg:DataGridComboBoxColumn SelectedValueBinding="{Binding parcatId}" SelectedValuePath="parcatId" DisplayMemberPath="catName" ItemsSource="{Binding    &lt;br /&gt;&lt;br /&gt;        Source={StaticResource categoryDataProvider}}"/&amp;gt;&lt;br /&gt;                &amp;lt;/dg:DataGrid.Columns&amp;gt;&lt;br /&gt;&amp;lt;/dg:DataGrid&amp;gt;&lt;br /&gt;&amp;lt;Button HorizontalAlignment="Left" Margin="165,148,0,0" Name="btnSave" Width="75" Height="23" VerticalAlignment="Top"&amp;gt;Save&amp;lt;/Button&amp;gt;&lt;br /&gt;&lt;br /&gt;    Here combobox is used for dropdown list in which parcatId is gonna be considered and catName wil be displayed..Many other properties of datagrid are mentioned&lt;br /&gt;&lt;br /&gt;here above..Also there is a Save button which when clicked things will be saved in databse..Based on this XAML file is our vb code which is as follows :-&lt;br /&gt;&lt;br /&gt;Imports System.Windows.Controls&lt;br /&gt;Imports System.Windows.Data&lt;br /&gt;&lt;br /&gt;Partial Public Class pgCategory&lt;br /&gt;&lt;br /&gt;    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnSave.Click&lt;br /&gt;        Dim dtCategories As System.Data.DataTable = pgCategoryDG.DataContext&lt;br /&gt;        Dim dtDeleted As System.Data.DataTable&lt;br /&gt;        For Each r As System.Data.DataRow In dtCategories.Rows&lt;br /&gt;            If r.RowState = DataRowState.Modified Then&lt;br /&gt;                modGlobal.objInventoryService.UpdateCategories(r.Item(0), r.Item(1), r.Item(2), r.Item(3))&lt;br /&gt;            ElseIf r.RowState = DataRowState.Added Then&lt;br /&gt;                If IsDBNull(r.Item(1)) Then&lt;br /&gt;                    MsgBox("Enter CatName!!!")&lt;br /&gt;                Else&lt;br /&gt;                    If IsDBNull(r.Item(3)) Then&lt;br /&gt;                        If IsDBNull(r.Item(2)) Then&lt;br /&gt;                            modGlobal.objInventoryService.InsertCategory(r.Item(1), "")&lt;br /&gt;                        Else&lt;br /&gt;                            modGlobal.objInventoryService.InsertCategory(r.Item(1), r.Item(2))&lt;br /&gt;                        End If&lt;br /&gt;                    Else&lt;br /&gt;                        If IsDBNull(r.Item(2)) Then&lt;br /&gt;                            modGlobal.objInventoryService.InsertCategories(r.Item(1), "", r.Item(3))&lt;br /&gt;                        Else&lt;br /&gt;                            modGlobal.objInventoryService.InsertCategories(r.Item(1), r.Item(2), r.Item(3))&lt;br /&gt;                        End If&lt;br /&gt;                    End If&lt;br /&gt;                End If&lt;br /&gt;            End If&lt;br /&gt;        Next&lt;br /&gt;        dtDeleted = dtCategories.GetChanges(DataRowState.Deleted)&lt;br /&gt;        If Not dtDeleted Is Nothing Then&lt;br /&gt;            dtDeleted.RejectChanges()&lt;br /&gt;            For i As Integer = 0 To dtDeleted.Rows.Count - 1&lt;br /&gt;                modGlobal.objInventoryService.DeleteCategories(dtDeleted.Rows(i)(0))&lt;br /&gt;            Next&lt;br /&gt;        End If&lt;br /&gt;        dtCategories.AcceptChanges()&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;    Private Sub pgCategoryDG_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)&lt;br /&gt;        Dim a As System.Data.DataSet&lt;br /&gt;        a = modGlobal.objInventoryService.RetriveCategories()&lt;br /&gt;        pgCategoryDG.DataContext = a.Tables.Item(0)&lt;br /&gt;    End Sub&lt;br /&gt;&lt;br /&gt;       &lt;br /&gt;Public Class Categories&lt;br /&gt;    Public Function GetCategories() As System.Data.DataView&lt;br /&gt;        Dim a As System.Data.DataSet&lt;br /&gt;        a = modGlobal.objInventoryService.RetriveCategories()&lt;br /&gt;        Return a.Tables.Item(0).DefaultView&lt;br /&gt;    End Function&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;    Here we have created another class called Categories which we have used for ObjectDataProvider. When form loads to display all data from database in Datagrid&lt;br /&gt;&lt;br /&gt;we have written function Loaded. In code of Save button we have written code for inserting,deleting and updating. In that we have checked each row whether its Modified&lt;br /&gt;&lt;br /&gt;(Update), Added (Insert), Deleted (Delete)..Based on that rowstate we can call our functions.&lt;br /&gt;&lt;br /&gt;So this is the whole code for creating a datagrid project..I hope it will help you all to create your own Datagrid projects..I will post more blogs on Datagrid soon..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-2751453431237863801?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/2751453431237863801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/08/wpf-toolkit-datagrid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2751453431237863801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2751453431237863801'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/08/wpf-toolkit-datagrid.html' title='WPF Toolkit Datagrid'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4588109698253569185</id><published>2009-08-16T23:20:00.000+05:30</published><updated>2009-08-16T23:22:33.709+05:30</updated><title type='text'>DEVCON Event :-</title><content type='html'>Biggest event in Pune DEVCON was held on 8-9th August in Pune..This event was held in COEP,Pune..Inspite of the destruction named Swine Flu event was successfull..2 days event had a very nice grip in lectures given by speakers like Amol Vaidya,Abhishek Kant,Dhaval Faria,Dr. Nitin Paranjpe, Mayur Tendulkar, Raj Chaudhary,Sanjay Vyas,Sarang Datye, Vikram Pendse, Vic Parmar and many more..Many topics like Silverlight3,JQuery,Azure etc were covered in this event..I was managing registration desk and goodies..All enjoyed sessions also were keen for all topics..All got lot of knowledge from all sessions..Despite of swine flu thing speaker came from across India like Mumbai, Hyderabad, Bengaluru, Pune.. and lot of thanks to audience as well..thats the true spirit of community!!! Special thanks to Mahesh Mitkari and all volunteers..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4588109698253569185?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4588109698253569185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/08/devcon-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4588109698253569185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4588109698253569185'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/08/devcon-event.html' title='DEVCON Event :-'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-8086266407175560330</id><published>2009-07-23T23:55:00.001+05:30</published><updated>2009-07-23T23:56:43.504+05:30</updated><title type='text'>DEVCON Event :-</title><content type='html'>The biggest event DEVCON is here once again in Pune..Its going to be held on 8-9 August 09..Industry experts speakers going to give sessions on interesting topics like .Net 4.0,Silverlight,Windows Azure,Visual Studio 2010 etc..Do not miss it :-) For &lt;span style="font-weight: bold;"&gt;FREE &lt;/span&gt;registration and other details visit site &lt;span style="font-weight: bold; font-style: italic;"&gt;  http://www.puneusergroup.org/events/devcon2009/&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-8086266407175560330?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/8086266407175560330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/07/devcon-event.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8086266407175560330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/8086266407175560330'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/07/devcon-event.html' title='DEVCON Event :-'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-2457889432017342035</id><published>2009-07-07T22:29:00.000+05:30</published><updated>2009-07-07T22:35:56.753+05:30</updated><title type='text'>ADO.NET output parameter in VB</title><content type='html'>This is used to give a direction to output parameter. When we write a stored procedure and when we declare output parameter in it in which we have to store output. This output parameter we have to declare in code also. While adding this parameter in code we have to use ParameterDirection.Output.&lt;br /&gt;&lt;br /&gt;Example : -&lt;br /&gt;&lt;br /&gt;Stored Procedure : -&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[USP_AuthenticateUsers]&lt;br /&gt;&lt;br /&gt;@username nvarchar(255),&lt;br /&gt;@password varbinary(MAX),&lt;br /&gt;@userId int output,&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;SET @userId=0&lt;br /&gt;&lt;br /&gt;   SELECT @userId=userId , @roleId=roleId FROM Users WHERE username=@username and [password]=@password&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Code : -&lt;br /&gt;&lt;br /&gt;Public Function AuthenticateUser(ByVal username As String, ByVal password As Byte(), ByVal userIPAddr As String) As structUserSession&lt;br /&gt;&lt;br /&gt;       Dim objCom As New System.Data.SqlClient.SqlCommand&lt;br /&gt;       objCom.CommandType = CommandType.StoredProcedure&lt;br /&gt;       objCom.CommandText = "USP_AuthenticateUsers"&lt;br /&gt;       objCom.Parameters.Add("userName", SqlDbType.NVarChar, 255).Value = username&lt;br /&gt;       objCom.Parameters.Add("password", SqlDbType.VarBinary, password.Length).Value = password&lt;br /&gt;       objCom.Parameters.Add("userId", SqlDbType.Int).Direction = ParameterDirection.Output&lt;br /&gt;     &lt;br /&gt;       DB.ExecuteNonQuery(objCom)&lt;br /&gt;&lt;br /&gt;       Dim objStructUserSession As New structUserSession&lt;br /&gt;       objStructUserSession.userId = objCom.Parameters.Item("userId").Value&lt;br /&gt;     &lt;br /&gt;   Return objStructUserSession&lt;br /&gt;&lt;br /&gt;End Function&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-2457889432017342035?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/2457889432017342035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/07/adonet-output-parameter-in-vb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2457889432017342035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/2457889432017342035'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/07/adonet-output-parameter-in-vb.html' title='ADO.NET output parameter in VB'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-6853520949711117198</id><published>2009-07-07T22:28:00.000+05:30</published><updated>2009-07-07T22:37:50.099+05:30</updated><title type='text'>If Condition in SQL</title><content type='html'>If...Else statement is used to test a condition. If we have more than 1 condition we can use If...Else statement. We can also have nested If...Else statements also. We have nested If...Else statements when we have to include 1 or more If...Else statements in 1 If...Else statement. If...Else Statement in SQL is used in execution os Stored Procedures.&lt;br /&gt;&lt;br /&gt;Syntax for simple If...Else statement is,&lt;br /&gt;&lt;br /&gt;IF ( Condition )&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;Syntax for nested If...Else statements is,&lt;br /&gt;&lt;br /&gt;IF ( Condition )&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;IF ( Condition )&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;END&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;END&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;ELSE&lt;br /&gt;BEGIN&lt;br /&gt;Sql Statements&lt;br /&gt;END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Example for simple If...Else statement is,&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[USP_InsertUserSession]&lt;br /&gt;@userId int,&lt;br /&gt;@userSession nvarchar(255),&lt;br /&gt;@userDate datetime,&lt;br /&gt;&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;declare @tmpuserId int&lt;br /&gt;   SELECT @tmpuserId=userId from UsersSessions WHERE userId=@userId&lt;br /&gt;&lt;br /&gt;   if @tmpuserId &gt; 0&lt;br /&gt;   begin&lt;br /&gt;    UPDATE UsersSessions SET userSession=@userSession, userDate=@userDate WHERE userId=@tmpuserId&lt;br /&gt;   end&lt;br /&gt;&lt;br /&gt;   else&lt;br /&gt;   begin&lt;br /&gt;    INSERT INTO UsersSessions(userId,userSession,userDate) VALUES (@userId,@userSession,@userDate)&lt;br /&gt;   end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-6853520949711117198?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/6853520949711117198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/07/if-condition-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6853520949711117198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/6853520949711117198'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/07/if-condition-in-sql.html' title='If Condition in SQL'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3729472374844889127</id><published>2009-06-26T00:01:00.000+05:30</published><updated>2009-06-26T00:02:47.444+05:30</updated><title type='text'>TechEd on roads</title><content type='html'>Attended TechEd on roads on 21st June 09. We had sessions on Win 7 SDK, .NET 4.0,Silverlight 3.Session was from morning 10 to evening 5.30. Session was very interactive.  Speakers were Dhaval Faria, Sarang Date, Vikram Pendse. I was handling registration desk. It was fun handling..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3729472374844889127?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3729472374844889127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/06/teched-on-roads.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3729472374844889127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3729472374844889127'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/06/teched-on-roads.html' title='TechEd on roads'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-7708246827116584371</id><published>2009-06-01T14:44:00.000+05:30</published><updated>2009-06-01T14:46:01.242+05:30</updated><title type='text'>Training in MVJ college, Bangalore</title><content type='html'>Conducted 1 day training in MVJ college, Bangalore on 28th May for faculty members. Training was on basics of .net. Training included .net framework 3.5, ASP.net, ADO.net, Windows mobile etc. The training lasted from 10 am to 4 pm. Faculty members were very interactive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-7708246827116584371?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/7708246827116584371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/06/training-in-mvj-college-bangalore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7708246827116584371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/7708246827116584371'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/06/training-in-mvj-college-bangalore.html' title='Training in MVJ college, Bangalore'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-355833686803359819</id><published>2009-06-01T14:42:00.000+05:30</published><updated>2009-06-01T14:44:16.754+05:30</updated><title type='text'>Training in Ambedkar Institute of Technology, Bangalore</title><content type='html'>&lt;span style="font-size:85%;"&gt;            Conducted 1 day training in Ambedkar Institute of Technology, Bangalore on 2nd May for faculty members. Training was on basics of .net. Training included .net framework 3.5, ASP.net, ADO.net, Windows mobile etc. The training lasted from 10 am to 4 pm. Faculty members were very interactive.&lt;br /&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-355833686803359819?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/355833686803359819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/06/training-in-ambedkar-institute-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/355833686803359819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/355833686803359819'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/06/training-in-ambedkar-institute-of.html' title='Training in Ambedkar Institute of Technology, Bangalore'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-5662892322884939338</id><published>2009-05-01T15:25:00.000+05:30</published><updated>2009-05-01T15:26:34.154+05:30</updated><title type='text'>What is Web Service?</title><content type='html'>Web Services are just like functions. We can define web service as a collection of functions which can be recalled. The description of this function calls is defined in a XML file called WSDL (Web Services Description Language). Functions are recalled through SOAP (Simple Object Access Protocol). This SOAP uses HTTP for transmission. XML is the basis for Web services. It provides a language which can be used between different platforms and programming language and still express complex messages and functions.So basically Web Services use XML to code and decode data and SOAP to transport it. Web Services are platform independent. They are also independent for the programming language. With Web Servics, Win 2k servers can be connected with UNIX servers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-5662892322884939338?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/5662892322884939338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/05/what-is-web-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5662892322884939338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/5662892322884939338'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/05/what-is-web-service.html' title='What is Web Service?'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-145355765465325327</id><published>2009-04-26T10:39:00.000+05:30</published><updated>2009-04-26T11:18:21.792+05:30</updated><title type='text'>What is WCF?</title><content type='html'>WCF...Windows Communication Foundation..&lt;br /&gt;* Its a programming framework used to build application that inter-communicate.&lt;br /&gt;* Its code name is 'Indigo'. It was released in December-2006.&lt;br /&gt;* WCF uses SOAP (Simple Object Access Protocol) messages between two processes. But while        communicating with a non-WCF process, XML-based encoding is used for the SOAP messages.&lt;br /&gt;* A WCF service is composed of 3 parts :&lt;br /&gt; 1) Service class that implements service to be provided.&lt;br /&gt; 2) host environment to host service.&lt;br /&gt; 3) one or more endpoints to which clients will connect.&lt;br /&gt;&lt;br /&gt;Use of WCF :&lt;br /&gt;* Because WCF can communicate using Web services, interoperability with other platforms that also support SOAP, such as the leading J2EE-based application servers, is straightforward.&lt;br /&gt;* We can also configure and extend WCF to communicate with Web services using messages not based on SOAP, for example, simple XML formats like RSS.&lt;br /&gt;* WCF helps provide reliability, security, and transactions when communicating with any platform.&lt;br /&gt;* It is designed to interoperate well with the non-WCF applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-145355765465325327?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/145355765465325327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/04/what-is-wcf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/145355765465325327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/145355765465325327'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/04/what-is-wcf.html' title='What is WCF?'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-4104347062806059081</id><published>2009-04-02T00:01:00.000+05:30</published><updated>2009-04-02T00:04:19.304+05:30</updated><title type='text'></title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;Session in Cummins college of engineering for Women&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="font-size:100%;"&gt;We took 1 day session and 2 days workshop on 27-28 February and 1st March in Cummins college of engineering for Women. Session was held for 2nd and 3rd year girls. In session we covered an introduction to .net,asp.net and ado.net.  &lt;br /&gt; &lt;br /&gt;        Many girls attended the session. 4 staff members also attended the session. MSPs Sonali, Shrishti, Shaizeen also were involved in our session.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-4104347062806059081?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/4104347062806059081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/04/session-in-cummins-college-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4104347062806059081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/4104347062806059081'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/04/session-in-cummins-college-of.html' title=''/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-1157894778109550132</id><published>2009-01-29T00:12:00.000+05:30</published><updated>2009-01-29T00:16:08.501+05:30</updated><title type='text'>What is Silverlight?</title><content type='html'>Silverlight is a combination of different technology into a single development platform that allows you to select tools and the programming language you want to use. Its a programmable web-browser plugin. It has features such as animation,vector ggraphics and audio-video playback.Its a cross-browser i.e. it works with all versions of all browsers to have existed since the web began. It can be implemented and inter-operated on multiple computer platforms. It aims to compete with Adobe Flash and presentation components of AJAX. It also computes with Sun Microsystems' JavaFX, which was launched few days after Silverlight. Silverlight supports Windows Media Audio and Video (WMA, WMV7–9) and VC-1, as well as MP3 audio. It is being designed to work in conjunction with XAML and is scriptable with JavaScript. Silverlight can also be used to create Windows Sidebar gadgets for Windows Vista. Silverlight exposes a Downloader object which can be used to download content, like scripts, media assets or other data, as may be required by the application.&lt;br /&gt;For more information visit  &lt;a href="http://www.silverlight.net/"&gt;http://www.silverlight.net/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-1157894778109550132?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/1157894778109550132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/01/what-is-silverlight.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/1157894778109550132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/1157894778109550132'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/01/what-is-silverlight.html' title='What is Silverlight?'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-211957134306237140</id><published>2009-01-12T23:58:00.000+05:30</published><updated>2009-01-13T00:10:57.800+05:30</updated><title type='text'>GridView AutoGenerateColumns</title><content type='html'>Till now we know that gridview generates autocolumns..But I wanted to get only 1 column in gridview..For that i found a solution that there is 1 property of gridview named as AutoGenerateColumns which is by default true.We just have to make it false so that we can manually generate columns how much we want..&lt;br /&gt;Example as shown below..&lt;br /&gt;&lt;br /&gt;&lt;asp:gridview id="GridView1" runat="server" autogeneratecolumns="False"&gt;&amp;lt; asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"&amp;gt;&lt;br /&gt;    &amp;lt; Columns&amp;gt;&lt;br /&gt;            &amp;lt; asp:BoundField DataField="quest" HeaderText="Questions" SortExpression="Questions" /&amp;gt;&lt;br /&gt;            &amp;lt; asp:TemplateField&amp;gt;&lt;br /&gt;                &amp;lt; ItemTemplate&amp;gt;&lt;br /&gt;                    &amp;lt; asp:Label ID="lblSelect" runat="server"&amp;gt; &amp;lt; a href="showOptions.aspx?qid=&amp;lt; %# Eval("QuesId") %&amp;gt; "&amp;gt; Select&amp;lt; /a&amp;gt; &amp;lt; /asp:Label&amp;gt;&lt;br /&gt;                &amp;lt; /ItemTemplate&amp;gt;&lt;br /&gt;            &amp;lt; /asp:TemplateField&amp;gt;&lt;br /&gt;    &amp;lt; /Columns&amp;gt; &lt;br /&gt;   &lt;br /&gt;    &amp;lt; /asp:GridView&amp;gt; &lt;columns&gt;&lt;asp:boundfield datafield="quest" headertext="Questions" sortexpression="Questions"&gt;&lt;br /&gt; &lt;/asp:boundfield&gt;&lt;br /&gt;&lt;br /&gt; &lt;/columns&gt;&lt;/asp:gridview&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-211957134306237140?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/211957134306237140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/01/gridview-autogeneratecolumns.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/211957134306237140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/211957134306237140'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/01/gridview-autogeneratecolumns.html' title='GridView AutoGenerateColumns'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1179145860502362999.post-3399484684152105114</id><published>2009-01-12T18:41:00.000+05:30</published><updated>2009-01-12T18:45:55.172+05:30</updated><title type='text'>Welcome to Ketaki's blog</title><content type='html'>Hello all..Welcome to my blog..Get ready to learn lot about technologies like .net etc..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1179145860502362999-3399484684152105114?l=ketakikode.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ketakikode.blogspot.com/feeds/3399484684152105114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ketakikode.blogspot.com/2009/01/welcome-to-ketakis-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3399484684152105114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1179145860502362999/posts/default/3399484684152105114'/><link rel='alternate' type='text/html' href='http://ketakikode.blogspot.com/2009/01/welcome-to-ketakis-blog.html' title='Welcome to Ketaki&apos;s blog'/><author><name>Ketaki</name><uri>http://www.blogger.com/profile/11812928403425492488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
