compilation error while converting to asp.net

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
 
H

Hans Kesting

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top