Ramani Sandeep's Blog

DotNetting – Fast , Easy Way of Developing Applications

Archive for July 3rd, 2009

Important Silverlight Tutorials for Beginners

Posted by ramanisandeep on July 3, 2009

Technorati Tags:

Important FAQ questions for WPF and SilverLight:

  • What is the need of WPF when we had GDI, GDI+ and DirectX?
  • How does hardware acceleration work with WPF?
  • Does that mean WPF has replaced DirectX?
  • So can we define WPF in a precise way?
  • What is XAML?
  • So is XAML meant only for WPF ?
  • Can you explain the overall architecture of WPF?
  • Which are the different namespaces and classes in WPF ?
  • Can explain the different elements involved in WPF application practically?
  • What are dependency properties?
  • Are XAML file compiled or built on runtime?
  • Can you explain how we can separate code and XAML?
  • How can we access XAML objects in behind code?
  • What kind of documents are supported in WPF?
  • What is SilverLight ?
  • Come on, even WPF runs under browser why SilverLight ?
  • Can SilverLight run in other platforms other than window?
  • What is the relationship between Silver Light, WPF and XAML?
  • Can you explain SilverLight architecture?

             click here to read more ……

 

SilverLight FAQ part 2 (Animations and Transformations)

  • What is the definition of animation from Silver light perspective?
  • What is a timeline in Silver light?
  • What are the different kinds of animation supported by Silverlight?
  • Can you explain doubleanimation , coloranimation and pointanimation ?
  • What is a story board?
  • Can we see a simple silverlight animation to just get started?
  • What are the different ways in which silver light does transformation?
  • Silverlight VS Flash good news and bad news

         click here to read more…

 

SilverLight’s FAQ – Part 3

    Technorati Tags:
  • Can you explain one way and two way bindings?
  • Can you explain One time binding?
  • Can you demonstrate a Simple example of OneWay and TwoWay?
  • What are the different ways provided to do layout in SilverLight?
  • Can you explain how Canvas layout actually works?
  • How can we implement Grid Layout?
  • How can we implement Stack Layout?
  • What are the different steps involved in consuming WCF service in Silverlight?
  • Why can’t we consume ADO.NET directly in SilverLight?
  • How can we do database operation using SilverLight?

        click here to read more…

Posted in WPF / Silverlight | Tagged: | Leave a Comment »

How do we create,Read,Delete Cookies in Asp.net

Posted by ramanisandeep on July 3, 2009

A cookie is a small bit of text file that browser creates and stores on your machine (hard drive). Cookie is a small piece of information stored as a string. Web server sends the cookie and browser stores it, next time server returns that cookie.Cookies are mostly used to store the information about the user. Cookies are stores on the client side.

Here i m going to explain you by providing example of Remember me Code :

Step 1 : if check box is checked for “Remember Me” then create cookie else Delete it.

if (chkRememberMe.Checked == true)
                    {
                        //Create Cookie to Store AdminInfo
                        HttpCookie aCookie = new HttpCookie("AdminInfo");
                        aCookie.Values["userName"] = txtUsername.Text;
                        aCookie.Values["Password"] = txtPassword.Text;
                        aCookie.Values["lastVisit"] = DateTime.Now.ToString();
                        aCookie.Expires = DateTime.Now.AddDays(10);
                        Response.Cookies.Add(aCookie);
                    }
                    else
                    {
                        //Delete Cookie
                        HttpCookie aCookie = new HttpCookie("AdminInfo");                       
                        aCookie.Expires = DateTime.Now.AddDays(-1);
                        Response.Cookies.Add(aCookie);
                    }

Step 2 : now check cookie is null or not in page load event & set username & password from cookie

protected void Page_Load(object sender, EventArgs e)
   {
       if (!IsPostBack)
       {
           if (Request.Cookies["AdminInfo"] != null)
           {
               txtUsername.Text = Request.Cookies["AdminInfo"]["userName"] == null ? null : Request.Cookies["AdminInfo"]["userName"].ToString();
               string pwd = Request.Cookies["AdminInfo"]["Password"] == null ? null : Request.Cookies["AdminInfo"]["Password"].ToString();
               txtPassword.Attributes.Add("value", pwd);
           }
       }

   }

 

Technorati Tags:

Posted in ASP.NET 2.0 | Tagged: | Leave a Comment »