Blog ( Of Ryan Olshan)

Recent Posts

News

About Ryan Olshan

LinkedIn Profile

Follow Ryan via twitter

Join StrongTypes - Free Generics Help By Email
Join StrongTypes

Community Credit Winner

View my MVP profile

The posts on this weblog are provided "as is" with no warranties and confer no rights. The opinions expressed herin are my own personal opinions and do not represent my employer's view in any way.

Subscribe to Rolog via My AOL
Subscribe to Rolog via Bloglines


Subscribe to Rolog via Feedburner

Furl Rolog




Subscribe to Rolog via Newsburst


Subscribe to Rolog via Pluck

Add Rolog to Technorati Favorites




Thycotic Secret Server

Receive Email Updates


.NET Websites

  • => StrongTypes.com <=
  • Community Credit
  • DotNetCharity.com
  • DotNetSlackers
  • EasyListBox
  • LearnAsp.com
  • SystemNetMail.com
  • SystemWebMail.com

Blogroll

  • Alex Campbell
  • Carlos Magalhaes
  • Charles Carroll
  • Chris Taylor
  • Darren Neimke
  • David Betz
  • Eric Smith
  • Rob Caron
  • Rob Howard
  • Sam Gentile
  • Scott Guthrie
  • Scott Mitchell
  • Tess
  • Wesner Moise
  • Jason Alexander
  • Bill Ryan
  • Steve Smith
  • Sahil Malik
  • David Silverlight

Other Websites

  • 911 Pigeon Alert
  • Pacific Wildlife Project

Strong Coder Bloggers

  • Dean Fiala
  • Doug Nelson
  • Kevin Jones

Yahoo! Groups

  • => StrongTypes <=
  • AspNet2
  • AspNet20GridView
  • PayPalDevDotNet
  • RubyOnRails
  • VSTS

Saturday, December 17, 2005 - Posts

Common DropDownList Issue

A common DropDownList issue I've seen on many forums and lists is about a DropDownList populating items 2x or not being able to get the selected value on postback when binding to a data source. This is due to the DropDownList having data bound to it again on postback before the form is processed. To prevent this, you will need to ensure that the DropDownList is only bound to data on the initial load of the page.

VB.NET
Private Sub Page_Load( ByVal sender As Object , ByVal e As EventArgs)
    If Not IsPostBack Then
       ' Code here to bind data to DropDownList
    End If
End Sub

C#
private void Page_Load( object sender, EventArgs e)
{
    if (!IsPostBack)
   {
       // Code here to bind data to DropDownList
   }
}

R

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 17 2005, 07:20 PM by Ryan Olshan | with 1 comment(s)
Filed under: , ,
Good One

Came accross a funny post on the ASP.NET forums. Good stuff.

http://forums.asp.net/1103287/ShowPost.aspx

R

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 17 2005, 06:54 PM by Ryan Olshan | with no comments
Parametric Polymorphism

What is parametric polymorphism? It sounds like such a cool phrase. Parametric polymorphism is a function or datatype that can be written generically so that it can deal equally well with any objects without depending on their type. .NET Generics are derived from the principles of parametric polymorphism.

There is even a formula for parametric polymorphism.

"Any dynamically typed function f that takes n arguments can be given a static type using parametric polymorphism: f  :  p 1  × ... ×  p n  →  r , where p 1 , ...,  p n and r are type parameters."

What practical bearing does this formula have on .NET Generics? Nothing, but I'm a math person and I think formulas are cool.

R

Share this post: | bookmark it! | digg it! | reddit! | kick it! | live it!
Posted: Dec 17 2005, 01:31 PM by Ryan Olshan | with 1 comment(s)
Filed under:
More Posts