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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.