J
~john
I have an ObjectDataSource pointing at a class, which based on the
SelectMethod and the parameter passed to it, returns an Object of my
custom class. The SelectMethod is something like
"GetEquipmentRecordByID"... the parameter being passed to the
SelectMethod is coming in as a GET variable.
<asp:ObjectDataSource
ID="ObjectDataSource2"
runat="server"
TypeName="EquipmentRecord_DAL"
SelectMethod="GetEquipmentRecordByID"
UpdateMethod="UpdateEquipmentRecord">
<SelectParameters>
<asp:QueryStringParameter DefaultValue=""
Name="EquipmentID" QueryStringField="EquipmentID" />
</SelectParameters>
When the page initially loads without GET variables, I'm wanting to set
the DefaultValue="" to a value returned from a class function. I'm not
sure how to do that... I've tried something like (below) but it's not
working
<asp:QueryStringParameter DefaultValue="<%=
MyClassName.GetFirstRecord() %>" Name="EquipmentID"
QueryStringField="EquipmentID" />
SelectMethod and the parameter passed to it, returns an Object of my
custom class. The SelectMethod is something like
"GetEquipmentRecordByID"... the parameter being passed to the
SelectMethod is coming in as a GET variable.
<asp:ObjectDataSource
ID="ObjectDataSource2"
runat="server"
TypeName="EquipmentRecord_DAL"
SelectMethod="GetEquipmentRecordByID"
UpdateMethod="UpdateEquipmentRecord">
<SelectParameters>
<asp:QueryStringParameter DefaultValue=""
Name="EquipmentID" QueryStringField="EquipmentID" />
</SelectParameters>
When the page initially loads without GET variables, I'm wanting to set
the DefaultValue="" to a value returned from a class function. I'm not
sure how to do that... I've tried something like (below) but it's not
working
<asp:QueryStringParameter DefaultValue="<%=
MyClassName.GetFirstRecord() %>" Name="EquipmentID"
QueryStringField="EquipmentID" />