Click here to Skip to main content
15,916,378 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 6:52
mentorNot Active26-Jul-10 6:52 
GeneralRe: nested repeater Pin
Dhyanga26-Jul-10 7:02
Dhyanga26-Jul-10 7:02 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 6:51
mentorNot Active26-Jul-10 6:51 
GeneralRe: nested repeater Pin
Dhyanga26-Jul-10 7:06
Dhyanga26-Jul-10 7:06 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 7:14
mentorNot Active26-Jul-10 7:14 
GeneralRe: nested repeater [modified] Pin
Dhyanga26-Jul-10 7:40
Dhyanga26-Jul-10 7:40 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 8:30
mentorNot Active26-Jul-10 8:30 
GeneralRe: nested repeater Pin
Dhyanga26-Jul-10 8:40
Dhyanga26-Jul-10 8:40 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 8:53
mentorNot Active26-Jul-10 8:53 
GeneralRe: nested repeater [modified] Pin
Dhyanga26-Jul-10 9:14
Dhyanga26-Jul-10 9:14 
GeneralRe: nested repeater Pin
Not Active26-Jul-10 10:31
mentorNot Active26-Jul-10 10:31 
GeneralRe: nested repeater Pin
Dhyanga26-Jul-10 10:35
Dhyanga26-Jul-10 10:35 
JokeRe: nested repeater Pin
Adam R Harris28-Jul-10 9:14
Adam R Harris28-Jul-10 9:14 
QuestionLocalizaing the data populating from database Pin
dev_asp_shreshtha26-Jul-10 5:20
dev_asp_shreshtha26-Jul-10 5:20 
AnswerRe: Localizaing the data populating from database Pin
Yusuf26-Jul-10 6:30
Yusuf26-Jul-10 6:30 
QuestionPost Alert Issue Pin
dev_asp_shreshtha26-Jul-10 5:14
dev_asp_shreshtha26-Jul-10 5:14 
QuestionSystem.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
antony beula26-Jul-10 4:42
antony beula26-Jul-10 4:42 
AnswerRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
Yusuf26-Jul-10 4:50
Yusuf26-Jul-10 4:50 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
antony beula26-Jul-10 5:05
antony beula26-Jul-10 5:05 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. Pin
Yusuf26-Jul-10 5:08
Yusuf26-Jul-10 5:08 
GeneralRe: System.Security.Policy.PolicyException: Required permissions cannot be acquired. [modified] Pin
antony beula26-Jul-10 5:14
antony beula26-Jul-10 5:14 
Questiondisplaying problem Pin
Dhyanga26-Jul-10 4:35
Dhyanga26-Jul-10 4:35 
I am using asp.net with c# and sql server. well I have some syntax error problem. my code is:
  <asp:Repeater runat="server" id="Repeater1">
  <HeaderTemplate>Items<br /><br /></HeaderTemplate>
  <ItemTemplate>
   <b><%# DataBinder.Eval(Container.DataItem, "CatName") %></t>

               <asp:HiddenField  ID="HiddenField1" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID") %>' />
               <asp:Repeater id="Repeater2" runat="server" DataSourceID="AccessDataSourceMembers">
               <ItemTemplate>
                  <tr>
                  <br><%# DataBinder.Eval(Container.DataItem, "ItemName") %></br>
                  </tr>
               </ItemTemplate>
              </asp:Repeater>
<asp:SqlDataSource ID="AccessDataSourceMembers" runat="server" ConnectionString="server=myComp;uid=sa;pwd=sa;database=catItem" SelectCommand="SELECT * FROM items Where cat_ID = ?">
  <SelectParameters>
      <asp:ControlParameter Name="ID" ControlID="HiddenField1" PropertyName="Value" Type="string" />

  </SelectParameters>

</asp:SqlDataSource>

  </ItemTemplate>
        <separatortemplate>
           <br />
           <br />
           <br />
         </separatortemplate>
      </asp:Repeater>


and the error it is showing is:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '?'.

Source Error:

Line 1197: objDA.Fill(ds);
Line 1198: Repeater1.DataSource = ds;
Line 1199: Repeater1.DataBind();
Line 1200:
Line 1201:


Note:If I do not use the nested repeater, it is working fine. So Can anyone tell me why is that error and how to get out of it??
suchita

AnswerRe: displaying problem Pin
Yusuf26-Jul-10 4:48
Yusuf26-Jul-10 4:48 
GeneralRe: displaying problem Pin
Dhyanga26-Jul-10 4:53
Dhyanga26-Jul-10 4:53 
GeneralRe: displaying problem Pin
Martin Jarvis26-Jul-10 6:51
Martin Jarvis26-Jul-10 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.