What's wrong with my code? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

What's wrong with my code?

theobsessiontheobsession Posts: 1Member
Hi guys,
I made an ASP.NET page in C#.
I get a compilation error when I try to view it in my browser.
"Description: An error occurred during the compilation of a resource required to service this request. Please review the specific error details below and modify your source code appropriately.

Compiler Error Message: CS1513: } expected"
I don't see anything with this code, maybe you guys can figure out what it is:

<% Import Namespace="System.Data" %>
<% Import Namespace= "System.Data.SQL" %>



protected void Page_Load(Object Src, EventArgs E )
{
stringsConnStr="server=localhost;uid=sa;pwd=;database=ibs2";
SQLConnection myCn = new SQLConnection(sConnStr);

String sSQL = "select * from slaps";
SQLDataSetCommand MyDSCmd = new SQLDataSetCommand(sSQL, myCn);


















'>
image' width="100" height="75" border="0">


'>
<%# DataBinder.Eval(Container.DataItem, "ModelName") %>
<%# DataBinder.Eval(Container.DataItem, "Description") %>
image
Tell me more...


Special Price: <%# DataBinder.Eval(Container.DataItem, "UnitCost", "{0:c}") %>

">
Add To Cart







Comments

  • asif_a_siddiqiasif_a_siddiqi Posts: 3Member
    You missed a } at the end of the function - here's the fix -->

    : Hi guys,
    : I made an ASP.NET page in C#.
    : I get a compilation error when I try to view it in my browser.
    : "Description: An error occurred during the compilation of a resource required to service this request. Please review the specific error details below and modify your source code appropriately.
    :
    : Compiler Error Message: CS1513: } expected"
    : I don't see anything with this code, maybe you guys can figure out what it is:
    :
    : <% Import Namespace="System.Data" %>
    : <% Import Namespace= "System.Data.SQL" %>
    :
    :
    :
    : protected void Page_Load(Object Src, EventArgs E )
    : {
    : stringsConnStr="server=localhost;uid=sa;pwd=;database=ibs2";
    : SQLConnection myCn = new SQLConnection(sConnStr);
    :
    : String sSQL = "select * from slaps";
    : SQLDataSetCommand MyDSCmd = new SQLDataSetCommand(sSQL, myCn);
    [blue]}[/blue] [green]// <---you missed a } here[/green]
    : </script>
    :
    :
    :
    :
    :
    :

    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :
    :

    : '>
    : image' width="100" height="75" border="0">
    :

    :

    : '>
    : <%# DataBinder.Eval(Container.DataItem, "ModelName") %><%# DataBinder.Eval(Container.DataItem, "Description") %>
    : image
    : Tell me more...
    :

    :

    : Special Price: <%# DataBinder.Eval(Container.DataItem, "UnitCost", "{0:c}") %>
    : ">
    : Add To Cart
    :

    :
    :
    :
    :
    :
    :
    :
    :
    :


Sign In or Register to comment.