Simple Question...

  • Thread starter Thread starter Amy Snyder
  • Start date Start date
A

Amy Snyder

Can I write server side script in the .aspx page?

I want to do like this:

<form name=form method=post onSubmit=<% myVariable from code behind page
%>
 
Yes, but the variable must be declared as Public or Protected in your
CodeBehind Class. But I wouldn't do this if possible, it defeats the
purpose of having CodeBehind pages, and it is more like the ASP way of doing
things. Also with your example you'd need to use the tags <%=myVariable%>,
which tells the processor to Response.Write the contents.

HTH,
--Michael
 
Well how would I go about assigning the title property of my <td>s? I
figured I would collect the title descriptions in an array and then
assign the array to the specific <td>. Like this:

<TD title="<%=myArray(1)%>"</TD>"
<TD title="<%=myArray(2)%>"</TD>"
...

I would like to do this in the code behind but I don't know how to go
about doing so. And its not as easy as assigning the titles to every TD
in the table sequentially.
 
Thanks, I'll take a look.

The title property acts just like an alt property on an image. The text
you set in the title property will appear when the mouse is hovered over
that TD.
 
Back
Top