CompilationError

C

CreativeMind

hi,
i m adding attribute of runat=server from codebehind file
<asp:imagebutton id="imgCompletionDate"
CssClass="clImageButton"
ImageAlign="absMiddle" BorderStyle="None" ImageUrl="..images
\img1000024.gif" CausesValidation="False" Height="20"></
asp:imagebutton></TD>
in code behindfile method
imgCompletionDate.Attributes.Add("runat","'server'");

, but it gives error CS1040: Preprocessor directives must appear as
the first non-whitespace character on a line and shows
the line which binds data at runtime. that is
<TD align="left" valign="top" class="GridCell" height="25px">
<%#DataBinder.Eval(Container, "DataItem.DocumentTitle")%>
</TD>
thx
 
B

Bob Barrows [MVP]

CreativeMind said:
hi,
i m adding attribute of runat=server from codebehind file

There was no way for you to know it (except maybe by browsing through
some of the previous questions before posting yours - always a
recommended practice), but this is a classic asp newsgroup. ASP.Net is
a different technology from classic ASP. While you may be lucky enough
to find a dotnet-savvy person here who can answer your question, you
can eliminate the luck factor by posting your question to a newsgroup
where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
There are also forums at www.asp.net where you can find a lot of people
to help you.

HTH,
Bob Barrows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,144
Latest member
KetoBaseReviews
Top