List Info

Thread: Null Value for a uniqueidentifier in a DropDownList




Null Value for a uniqueidentifier in a DropDownList
country flaguser name
United States
2007-09-11 13:57:40
Hi,

I have a DropDownList with uniqueidentifiers as values and I
have
manually added a 'None' option like this:

        DropDownList parent =
siteSetupForm.FindControl("parentDDL")
as DropDownList;
        parent.Items.Insert(0,new ListItem("None",
null));

I have tried a few different approaches but I can't seem to
get around
this SQL error:
Conversion failed when converting from a character string
to
uniqueidentifier.
Does anyone know the syntax to pass that null without
sqlServer
thinking it's a string?
Thanks

Haze


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "ASP.Net Community" group.
To post to this group, send email to aspnetgooglegroups.com
To unsubscribe from this group, send email to
aspnet-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/aspnet?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )