How do I call a function inside an <asp:QueryStringParameter>?

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" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top