VB.NET - Preprocessor directive expected

Asked By saranya
04-Feb-12 01:34 AM
Hi frndz!


Iam doing project in asp.net 2.0,c#. in my project customer have to upload photos in admin page and it should be displayed in the website, in image iam using facebox. when i click 1 image in facebox there sholud be 3 images has to run in facebox. so in admin page iam using. smallimagepath,bigimagepath ,bigimagepath1 ,bigimagepath2. in that small imagepath will display in website.when i click the small imagepath picture ,bigimagepath,bigimagepath1,bigimagepath2 these three picture has to run in facebox. For 1 image in facebox i done already but for next 2 images i tried but its showing error. Below is my code:

<asp:datalist   id="dlDepts"   runat="server"   repeatcolumns="4"   repeatdirection="Horizontal"  repeatlayout="table"      forecolor="darkred"    ShowFooter ="true"  OnSelectedIndexChanged="dlDepts_SelectedIndexChanged" ><itemtemplate>
            <table width="220" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
    <table width="180" border="0" cellspacing="0" cellpadding="0">
    
    <tr>
     //This line shows error// <td align="center" valign="middle"><a href="admin/upload/<%#DataBinder.Eval(Container.DataItem,"bigimagepath")%> <% #DataBinder.Eval(Container.DataItem,"bigimagepath1")%> <%#DataBinder.Eval(Container.DataItem,"bigimagepath2" )%>" rel="lightbox"><img src="admin/upload/<%#DataBinder.Eval(Container.DataItem,"smallimagepath")%>" alt="Small1" width="200" height="200" border="0" /></a>
</td>

    </tr>
    <tr>
      <td width="180" height="30" align="left" valign="middle" class="h6">Code :<%#DataBinder.Eval(Container.DataItem, "code")%></td>
    </tr>
    <tr>
      <td height="25" align="left" valign="middle">
      <a href="javascript:OnClientOpen1('<%# DataBinder.Eval(Container.DataItem, "[id]") %>')" ><img src="images/order-now-button.png" width="74" height="17" border="0" /></a>
      
      </td>
    </tr>
    </table>
    </td>
  </tr>
</table>               
  </itemtemplate>
    <footerstyle
      backcolor="darkred"
      forecolor="lightyellow"
      font-bold="true"



Iam getting error as:

CS1024: Preprocessor directive expected

    />  
</asp:datalist>

Help me frndz
  D Company replied to saranya
04-Feb-12 10:18 AM
hello ,

first of all, it seems syntactical error.check with this Fixed thread from Egghead

http://http://www.eggheadcafe.com/community/asp-net/17/10297159/cs1024-error-preprocessor-directive-expected.aspx

let me know, if the case is different
Regards
D
Create New Account
help
defferentiate code to be executed in the codebehind other than using if else? thanks A preprocessor directive must be the only instruction on a line. Preprocessing directives are lines in your program is allowed before and after the `#'. The `#' is followed by an identifier that is the directive name. For example, `#define' is the directive The C# language's preprocessor directives are as follows: ·#if ·#else ·#elif ·#endif ·#define ·#undef ·#warning ·#error ·#line ·#region ·#endregion is not defined"); #endif } } You'll need to go look up how they work in VB.NET i read this on msdn. . my Q was a is there a way to set that code in If statement. eg. If (ConfigurationSettings.AppSettings( "TEST" ) = "True" ) Then . . . . End If In VB.NET, conditional compiler constants and literals are the only value types allowed to be assigned
easynn.com VC MFC Discussions Windows Server (1) Linux (1) Vista (1) ASP.NET (1) VB.NET (1) LINQ (1) WPF (1) VB (1) I think they are "header guards" to avoid than one time during a compilation. In modern C++ you may use the #pragma once directive, even if I'm not sure if #pragma once is perfectly equivalent to the #ifndef guard means that a fairly deep semantic analysis of the program is required by the preprocessor, for example, to discover not only the #ifndef but that the "flow control" in the preprocessor means that it can't be valid more than once. How do you distinguish these two cases: . . . . from . . . without a fairly deep analysis that is beyond the capability of a preprocessor? Consider the standard header file process.h, for example, and explain how the analysis can MVP Tips: http: / / www.flounder.com / mvp_tips.htm It actually isn't that complicated. The preprocessor can easily note that an included file contains with no code outside of the #if though. Bo Persson It seems that "#pragma once" is deprecated on GCC, because the compiler / preprocessor might fail to recognize that different header files are actually the same header file (e
the maximum value that works? Just use 1. What do you think about that? Thanks VB.NET Discussions Marshal (1) SHFILEOPSTRUCT (1) BITMAP (1) Pack (1) DxRightIndent (1) DxStartIndent (1) StructLayout (1 http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > What does vb.net do. I am wondering when I need to include Pack: IIRC the default is a The packing required by the target expecting the structure is defined by the '#pragma pack' preprocessor directive. The general layout rule with 'pack' is defined as follows (taken from the documentation on URL:http: / / dotnet.mvps.org / > V B <URL:http: / / dotnet.mvps.org / dotnet / faqs / > Does vb.net treat packing the same way as C? That is, for a given n, will a
Discussions Page.ClientScript.RegisterClientScriptBlock (1) RegisterClientScriptBlock (1) Page.IsPostBack (1) DateTime (1) ASP.NET (1) VB.NET (1) Escape (1) Report (1) Why do you not use consequent @"x" when using syntax to understand C#; it doesn't need to guess at the language; there's a directive telling it what language is being employed it seems a little odd to - - in effect Not only does need to cope with string escaping, it suddenly needs to understand the preprocessor. . . then there's comments. . . and that's just off the top of my head. It personally think the ASP.NET engine is a lot simpler *without* having to contain a VB.NET parser and a C# parser, don't you? Considering the miniscule nature of this restriction
t Microsoft just change the version number? .NET Framework Discussions LLBLGen (1) ASP.NET (1) VB.NET (1) WCF (1) WPF (1) VB (1) IDisposable (1) IEnumerator (1) Only Microsoft marketing might n Out of curiosity - what were the language enhancements in 1.1? I'm a VB.NET coder, and tbh I can only remember a few subtle changes - things like inline variable library / aa289527(VS.71).aspx the changes in C# were: 1) Support for the #line preprocessor directive 2) Support for / * * * / doc comments (I've never seen these used in C#) 3) foreach