Forums

This topic is locked

Constructing Variables in Dreamweaver and ASP.NET

Posted 24 Sep 2007 19:04:53
1
has voted
24 Sep 2007 19:04:53 Robert Iveson posted:
<font face='Arial'>
Hello! Firstly, I'll have to apologise for asking a potentially dumbass question - I've been a long time user of Dreamweaver and ASP, but I've recently been asked to develop a site in ASP.NET, and things are going a bit rubbish.

Generally, if I am calling a recordset item from Dreamweaver, I may use something like this:

&lt;% myvariable = (RSPages.Fields.Item("PageID".Value) %&gt;

Then I can use 'myvariable' along the lines of :

&lt;% if myvariable = "1" then
... do something ...
end if %&gt;

However, I want to use a similar procedure in ASP.NET, but it doesn't quite work according to plan. I'm using the variable in a Repeating Region, and want to do something like:

&lt;% myvariable = (RSPages.Fields.Item("PageID".Value) %&gt;

But (RSPages.Fields.Item("PageID".Value) on it's own doesn't work in this case.

&lt;%#(RSPages.Fields.Item("PageID".Value)%&gt; does work in the Repeating Region, however, but I'm unable to 'use' it as a variable.

Obviously I can't use:

&lt;% myvariable = &lt;%#(RSPages.Fields.Item("PageID".Value)%&gt; %&gt;

So now I'm stuck. What would the correct syntax be in this case?

Many thanks!

Bert.


</font id='Arial'>

Reply to this topic