in my opinion yes...assuming ur developing on 32-bit system...
a c# int (or vb.net integer) maps to Int32 on a 32bit system so it's what
you'll get the most performance out of...
Int16 is only useful when you have very large chunks of data (large int
arrays) and you want to consume less space....
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Andy Sutorius" <(E-Mail Removed)> wrote in message
news:g5KVd.31243$(E-Mail Removed)...
> Hi Karl,
>
> Why should it be ToInt32?
>
> Andy
>
>
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:(E-Mail Removed)...
> > use e.Item.ItemIndex to get the index of the item
> >
> > dlstProducts.DataKeys[e.Item.ItemIndex]
> >
> > also, any particular reason you are using ToInt16 instead of 32?
> >
> > Karl
> >
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/ - New and Improved (yes, the popup is
> > annoying)
> > http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> > come!)
> > "Andy Sutorius" <(E-Mail Removed)> wrote in message
> > news:%RIVd.31239$(E-Mail Removed)...
> > > Hi,
> > >
> > > I have a datalist with a asp:button. I have onitemcommand firing when
> the
> > > button is clicked. I am attempting to get the datakey of the button
that
> > was
> > > clicked. I can retrieve a specific datakey with the following: int
> > > intProductID = Convert.ToInt16(dlstProducts.DataKeys[0]) but how do I
> > > retrieve the datakey of the button clicked? I have tried this
> > > unsuccessfully: int intProductID =
> > Convert.ToInt16(dlstProducts.DataKeys[e])
> > >
> > > Thanks,
> > >
> > > Andy
> > >
> > >
> >
> >
>
>