Click here to Skip to main content
15,886,919 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
AnswerRe: displaying problem Pin
Stoffy197226-Jul-10 9:16
Stoffy197226-Jul-10 9:16 
GeneralRe: displaying problem Pin
Dhyanga27-Jul-10 2:53
Dhyanga27-Jul-10 2:53 
AnswerRe: displaying problem Pin
aswinnnnnnn26-Jul-10 18:21
aswinnnnnnn26-Jul-10 18:21 
QuestionPopupcontrol extender Pin
Amit Patel198526-Jul-10 4:03
Amit Patel198526-Jul-10 4:03 
AnswerRe: Popupcontrol extender Pin
Yusuf26-Jul-10 4:13
Yusuf26-Jul-10 4:13 
GeneralRe: ModalPopupExtender extender Pin
Amit Patel198526-Jul-10 4:22
Amit Patel198526-Jul-10 4:22 
GeneralRe: ModalPopupExtender extender Pin
saanj27-Jul-10 3:04
saanj27-Jul-10 3:04 
Questiondrop down with check box Pin
Amit Patel198526-Jul-10 3:13
Amit Patel198526-Jul-10 3:13 
AnswerRe: drop down with check box Pin
Not Active26-Jul-10 3:33
mentorNot Active26-Jul-10 3:33 
AnswerRe: drop down with check box Pin
Yusuf26-Jul-10 4:43
Yusuf26-Jul-10 4:43 
QuestionAuto Complete extender problem Pin
Amit Patel198526-Jul-10 3:09
Amit Patel198526-Jul-10 3:09 
Questionhow to avoid loading time while using repeater Pin
prakash.ss8326-Jul-10 2:23
prakash.ss8326-Jul-10 2:23 
AnswerRe: how to avoid loading time while using repeater Pin
Not Active26-Jul-10 2:42
mentorNot Active26-Jul-10 2:42 
AnswerRe: how to avoid loading time while using repeater Pin
Herman<T>.Instance26-Jul-10 3:48
Herman<T>.Instance26-Jul-10 3:48 

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.