473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

using a variable in eval

1
I am using c# in my asp.net script and trying to make an eval call as

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
DataSourceID="SqlDataSource1" PageSize="3" AutoGenerateColumns="False" >
<Columns>
<asp:TemplateField >
<ItemTemplate>
<table style="width: 950px; height: 10px" border="2" cellpadding="0" cellspacing="0">
<tr><td><%# Eval("Manager") %></td></tr>
<tr>
<%string month; %>
<%
for (int i = 0; i < 6; i++)
{
month = "Mon_" + 1;
Response.Write("<td>");%>
<%# Eval(m)%>
<%Response.Write("</td>");
}%>

</tr>

</table>
</ItemTemplate>

...


I get the error message:The name 'month' does not exist in the current context.

How could I solve this problem? Thanks!
Feb 21 '07 #1
0 988

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: bofh | last post by:
I'm working on a project where I need to store a CGI query in a database field. The query contains variables which will be substitued at runtime (e.g., today's date, key to select upon, etc), and...
1
by: Weston C | last post by:
In the course of trying to build a simple clock, I've run into a problem using the setInterval (and setTimeout) function. http://weston.canncentral.org/misc/tkeep/tkeep.html...
9
by: Stefan Mueller | last post by:
I'd like to set a variable called 'FocusIsOn' if a button got the focus. Because my button is dynamically created I do it like xelement = document.createElement("input") xelement.type = "button"...
3
by: Wayne Wengert | last post by:
I have an application where a session variable is set in an ASPX page, The process calls an ASP page and when in that page the session variable appears to be null. How can I pass a session variable...
2
by: Bruce Dumes | last post by:
Ok, the subject line of this is pretty confusing, I'll admit. I'm new to dotnet and VB. I've used this kind of construction in Perl a zillion times over the years. What I've got is something...
5
by: R | last post by:
Hi All, I'm using eval and arrays in foreach and have trouble with adding elements to them - I'm talking about the '' operator. My code is: // creates arrays with the names of columns in...
3
by: Mehmet Yavuz S. Soyturk | last post by:
Hello, consider the next code: var obj = {}; with(obj) { var x = 10; } print(x); print(obj.x);
8
by: Tuxedo | last post by:
How can I modify any one of these global variable identified via a function argument? var x1 = "bla"; var x2 = "bla"; var x3 = "bla"; function modify(variable) { ???? ???? = "blabla":
7
by: ManningFan | last post by:
I've got a field in a table that keeps the name of functions I need to run. I do a DLookup on the table to retrieve the name of the function I need to run (based on whatever criteria). How...
8
by: jj | last post by:
Trying to understand the manual regarding variables to solve the following. I'm working with Drupal CMS and have a loop to retrieve values that are normally fetched by using this variable:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.