compilation error while converting to asp.net

  • Thread starter Thread starter amitbadgi
  • Start date Start date
A

amitbadgi

Hi I am converting an asp application to asp.net, I am geeting the
following error,

Compiler Error Message: BC30201: Expression expected.

Source Error:



Line 299:<li><a
href="add_individual.asp?x=<%=rs_offenderinfo.Fields.Item("STU_ID").Value%>">


Line 300:Edit Offender Information</a></li>

Line 301:<li><a
href="add_event.aspx?n=<%=server.URLEncode(((rs_offenderinfo.Fields.Item('"full_NAME"').Value)
* 145) + 23)%> &
id=<%=((rs_offenderinfo.Fields.Item("STU_ID").Value))%> &
type=<%=(rs_offenderinfo.Fields.Item("type").Value)%>">Add

Line 302:New Events </a></li>
Line 303:<% end if %>


Source File: C:\Documents and
Settings\amit\Desktop\WebSite1\main_offender_non.aspx Line: 301
 
Hi I am converting an asp application to asp.net, I am geeting the
following error,

Compiler Error Message: BC30201: Expression expected.

Source Error:



Line 299:<li><a
href="add_individual.asp?x=<%=rs_offenderinfo.Fields.Item("STU_ID").Value%>">


Line 300:Edit Offender Information</a></li>

Line 301:<li><a
href="add_event.aspx?n=<%=server.URLEncode(((rs_offenderinfo.Fields.Item('"full_NAME"').Value)
* 145) + 23)%> &
id=<%=((rs_offenderinfo.Fields.Item("STU_ID").Value))%> &
type=<%=(rs_offenderinfo.Fields.Item("type").Value)%>">Add

Line 302:New Events </a></li>
Line 303:<% end if %>


Source File: C:\Documents and
Settings\amit\Desktop\WebSite1\main_offender_non.aspx Line: 301

Caution: when you just rename a xx.asp file to xx.aspx, you are
ignoring at least 90% of the possibilities of ASP.Net.

a) you are building html on-the-fly. The ASP.Net way is to place
a listbox control on the aspx/ascx page, and fill (or hide) it from code-behind.

b) you seem to be using recordsets. DataSets are better.

Hans Kesting
 
Back
Top