help! server tags cannot contain <% ... %

Results 1 to 2 of 2

Thread: help! server tags cannot contain <% ... %

  1. #1
    Join Date
    Dec 1969

    Default help! server tags cannot contain <% ... %

    I&#039;m working on a project where I need to pass a variable in when calling a server control to specify an xml config file. This config file differs for each page and therefore I need to be able to pass the parameter to the control dynamically.<BR><BR>So, for example, I&#039;d like to be able to do something like this:<BR>&#060;asp:mycontrol id="test1" config="&#060;%= myPath%&#062;"&#062;<BR>&#060;/asp:mycontrol&#062;<BR><BR>But obviously when I do that I end up getting the error message contained in the subject. Is there some way around this? Or can I set the additional parameter programatically somehow? Like in a script block? I&#039;m fairly new to (php background) at this point, so any advice is appreciated :-).<BR><BR>Thanks in advance!

  2. #2
    Join Date
    Dec 1969

    Default RE: help! server tags cannot contain <% ... %

    You can usually assign the variable on page load<BR><BR>Like<BR><BR>Sub Page_Load<BR>Dim ThePath as String = &#039; Wherever this value comes from<BR>Test1.Config = ThePath<BR>End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts