Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6182829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:15:54+00:00 2026-05-24T01:15:54+00:00

I have a problem regarding with FindControl.I’m using ASPxRoundPanel(with DXperience component) in a repeater.

  • 0

I have a problem regarding with FindControl.I’m using ASPxRoundPanel(with DXperience component) in a repeater. I have a textbox called “txtAdet ID” in ASPxRoundPanel. I just can’t access inside the Textbox.And I got the following the error.

"Object reference not set to an instance of an object." 

ascx. code:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="urunLinq"
    onitemcommand="Repeater1_ItemCommand">
<ItemTemplate>

    <dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="980px" ShowHeader="true" Height="550px">
   <PanelCollection>
   <dxrp:PanelContent>
   <div style="width:980; overflow:hidden;height:350px;">
   <div style="float:left; width:410px;height:310px;">
    <asp:Image ID="Image1" Width="400" Height="300" ImageUrl='<%# "../urunResim/"+Eval("urunAnaResim") %>' runat="server" />
</div>
<div style="float:left;margin-top:0px;overflow:hidden;width:500px;">
<h2><%# Eval("urunAdi") %></h2>

<h4>Ürün Özellikleri</h4>
<p style="font-size:x-small;"><%# Eval("urunOzellikleri") %></p>
<br />
<table>
<tr>
<td><h5>Adet    </h5></td><td><asp:TextBox ID="txtAdet" Width="50" runat="server"></asp:TextBox></td>
<td><h4>        Peşin Fiyatı :</h4></td><td><h3 style="color:Red;">  <%# Eval("kdvliFiyat") %>TL</h3></td>
</tr>
</table>
<br />
<table>
<tr>
<td><a href="#">İnternet satış taksitlerini görmek için tıklayın.</a></td>
<td>                
<asp:ImageButton ID="ImageButton1" CommandName="sepeteKaydet" runat="server" ImageUrl="~/img/icons/sepeteEkle.JPG" /></td>
</tr>
</table>
</div></div>

   </dxrp:PanelContent>
   </PanelCollection>
   <HeaderTemplate>
   <h3><%# Eval("urunAdi") %></h3>
   </HeaderTemplate>
    </dxrp:ASPxRoundPanel>

</ItemTemplate>
</asp:Repeater> 

.cs code:

protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (e.CommandName=="sepeteKaydet")
            {
               TextBox bulunanTextKontrol = ((TextBox)e.Item.FindControl("txtAdet"));
               string urunAdet = bulunanTextKontrol.Text;
               string sessionId = Session.SessionID;
               int urunId=Convert.ToInt32(Request["id"].ToString());
               tempSepet geciciSepet = new tempSepet()
               {
                    adet = Convert.ToInt32(urunAdet),
                    eklemeSaati = Convert.ToString(DateTime.Now.Hour.ToString()),
                    eklemeTarihi = Convert.ToString(DateTime.Now.ToShortDateString()),
                    sessionId = sessionId,
                    urunId = urunId
               };
               selcukData.tempSepets.InsertOnSubmit(geciciSepet);
               selcukData.SubmitChanges();
               Response.Write("<script type='text/javascript'>alert('Ürün sepetinize başarıyla eklendi')</script>");
               ((TextBox)e.Item.FindControl("txtAdet")).Text = null;
            }
        } 

I got a error the following line.

 string urunAdet = bulunanTextKontrol.Text;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:15:55+00:00Added an answer on May 24, 2026 at 1:15 am

    ASPxRoundPanel control is a subclass of ASPxWebControl which implements INamingContainer interface. It means that FindControl called on any parent control (RepeaterItem at your case) won’t be able to find anything inside ASPxRoundPanel (explanation here). So you need at least two steps to accomplish your task:

    ASPxRoundPanel1 roundPanel =  ((ASPxRoundPanel1)e.Item.FindControl("ASPxRoundPanel1"));
    TextBox bulunanTextKontrol = ((TextBox)roundPanel.FindControl("txtAdet"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem regarding the datediff MYSQL function, I can use it and
I have a problem regarding to MPMoviePlayer. I am using [self presentModalViewController:moviePlayer animated:YES]; to
i have a problem regarding the textbox. i have done the textbox auto expandable
I am using mootools1.2 as my js framework. I have one problem regarding the
I have a problem regarding to the software deployment. We're using JBoss 4.2.3. Please
I have just solved another problem regarding the same piece of code but I
I have this problem regarding sql which i will be using in a webservice
I have a problem regarding duplicate record.I have a table called tbl_Kisiler as shown
I have a problem regarding the name resolution of a type called Action. While
I have A problem regarding Converting Xaml to C# , I m using Auto

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.