select parameters sqldatasource

<asp:SqlDataSource ID="dsMysource" runat="server" ConnectionString="<%$ ConnectionStrings:xxx%>"
            SelectCommand="spmy" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:Parameter Name="id" Type="Int32" DefaultValue="0" />
               <asp:Parameter Name="check" Type="Boolean" DefaultValue="0" />
            </SelectParameters>
        </asp:SqlDataSource>

I get a error for the boolean, what am I doing wrong...? I am trying to set to default value of false for the check field which is bit field...

And second part of the question on code behind c#
dsMysource.SelectParameters["check"].DefaultValue = ??? ;
1jawsAsked:
Who is Participating?
 
Dale BurrellDirectorCommented:
It definitely should be

 <asp:Parameter Name="check" Type="Boolean" DefaultValue="False" />
0
 
Dale BurrellDirectorCommented:
Its a C# parameter field at this point, Default="False"
0
 
Dale BurrellDirectorCommented:
dsMysource.SelectParameters["check"].DefaultValue = true; // = false;
0
 
1jawsAuthor Commented:
on C# code behind, I am setting to check default value to true... but on aspx , here

 <asp:Parameter Name="check" Type="Boolean" DefaultValue="0" />

trying to set to false... and for some reason giving me problem..
0
 
1jawsAuthor Commented:
thank you and other one should be "True"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.