Link to home
Start Free TrialLog in
Avatar of pamsauto
pamsauto

asked on

VB.net ASPX Binding a Query String to a Controls Property

This should be easy buy I am missing something.   I am trying to bind a Querystring to a controls property and I can't get the syntax right.    If I bind by Index value it will work - like this.

<uc:FindParts runat="server" id="findParts" Nonexact="<%# Request.QueryString(0)%>" />

Open in new window


If I bind by name string I get a "server tag is not well formed.

<uc:FindParts runat="server" id="findParts" Nonexact="<%# Request.QueryString("test")%>" />

Open in new window


What am I missing?
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Try it as a function:
Nonexact="<%# MyFunc() %>"


.VB

Public Function MyFunc(obj test) as String
      return Request.QueryString("test").ToString()
end Function
ASKER CERTIFIED SOLUTION
Avatar of pamsauto
pamsauto

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pamsauto
pamsauto

ASKER

This is the fix