I am creating a website now using Microsoft Visual Web Developer 2010 Express and I used the toolbox of \"createUserWizard\"
. Then I put the userId
If you want to insert GUID from your code, you should make parameter type GUID
<asp:Parameter Name="ParamName" DbType="Guid" />
And you should pass GUID value as (c#):
SqlDataSource1.InsertParameters["ParamName"].DefaultValue = System.Guid.NewGuid().ToString();
If you want to pass a string value, you have to use CONVERT(UNIQUEIDENTIFIER,'YOUR VALUE')
in the insert query like this:
InsertCommand="INSERT INTO [Order] ([UserId], [etc])
VALUES (CONVERT(UNIQUEIDENTIFIER,@UserId), @etc)"