Technical support This forum is closed.
Version 1.x > Technical support > dynamic value passed into QueryRepeater View modes: 
User avatar
Member
Member
nsightmedia - 1/19/2006 7:05:19 PM
   
dynamic value passed into QueryRepeater
I have a question. This time, I believe it to be fairly tricky. I would like to pass a variable into the QueryRepeater control. Specifically, I am trying to pass an integer into the "WhereCondition" parameter in order to grab a single row of data to display. The code follows like this:

WhereCondition='<%# "ATMsID = " + Convert.ToString(Request.QueryString("ID")) %>'


--which yields a statement that *looks like* it should work (if you pass ?ID=3) in the address line, then when you check this value by adding the code:

<%=locationDetail.WhereCondition%>

you get

ATMsID = 3

But...and this is a big but...the code ignores the WhereCondition and displays everything.

Is this a glitch, am I going about this the wrong way, or am I just missing something obvious. Your help here, all, is greatly appreciated.

Thanks,

William.

User avatar
Guest
admin - 1/19/2006 9:09:44 PM
   
Re: dynamic value passed into QueryRepeater
Hi William,

you may want to put this code into your Page_Load event like this:

QueryRepeater1.WhereCondition = "ATMsID = " + Convert.ToString(Request.QueryString("ID"));

Please let me know if it helps.

Best Regards,