473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FIND CONTROL PROBLEM

I have a datagrid and save button in my page.. when i click save button it
doesnt get the text box values. What can be the problem ?

<asp:DataGrid id="DataGrid_telefon"
OnDeleteCommand="DataGrid_telefon_OnDeleteCommand"
OnItemDataBound="DataGrid1_OnItemDataBound" style="Z-INDEX: 101; LEFT: 48px;
POSITION: absolute; TOP: 112px"
runat="server" AllowPaging="True" AutoGenerateColumns="False"
Font-Size="Medium">
<Columns>
<asp:TemplateColumn HeaderText="Sil">
<ItemTemplate>
<!--<asp:Button id="Button1" CommandName="Delete" runat="server"
Text="Sil" Width="32px"></asp:Button>-->
<asp:PlaceHolder Runat=server ID ="plhDelete"></asp:PlaceHolder>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn Visible="False" HeaderText="id">
<ItemTemplate>
<asp:TextBox id=txyorum runat="server" Text='<%#
DataBinder.Eval(Container, "DataItem.yorum") %>' Width="24px"
ReadOnly="True" Font-Size="XX-Small" Visible="False">
</asp:TextBox>
</ItemTemplate>
<asp:Button id="Kaydet" style="Z-INDEX: 101; LEFT: 600px; POSITION:
absolute; TOP: 596px" runat="server"
Text="Kaydet" Width="88px"></asp:Button>

in onclick event for save button

Private Sub Kaydet_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Kaydet.Click

Dim strQuery As String

Dim dgItem As DataGridItem

'SqlConn.Open()

Dim Marka As String

For Each dgItem In DataGrid_telefon.Items

Dim txtDesc As TextBox = _

CType(dgItem.Cells(1).FindControl("txtyorum"), TextBox)
Dim item As Integer

strQuery = "I" & txtDesc.ID & txtDesc.Text.ToString

Response.Write(strQuery)

Next

End Sub
Mar 29 '07 #1
0 789

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Yasutaka Ito | last post by:
Hi, Is there a way to find to which control the current control is docked against? For example, let's say I have panel1 and panel2 docked to left within a form. The panel1 is the first one on...
0
by: Tim ffitch | last post by:
Hi I have a main form with some fields directly on the form and others on a page of a Tab Control. On another page of the Tab Control I have a sub form. In the On Current event of my main form I...
3
by: P.L. | last post by:
Hi! I have problem with Datarepeater control. When I load template from external aspx file ItemTemplate = Page.LoadTemplate(....); I can't find control in ItemDataBound event. ...
2
by: Josh | last post by:
Hi Guys, I have been stuck on this problem for several days now, i have a set of nested datagrids. Inside the second datagrid i have a dropdown list, a textbox and a label. I want the textbox...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
5
by: PCH | last post by:
I have an c# asp.net (.net 1.1) web page, viewstate on. The problem I am having is on the button click postback to update. Heres the situation: I have an asp table that has 1 header row. ...
2
by: madani | last post by:
Hi, I made custom web control. this control have an Event like "TestEvent", How can I find out if properties of other controls of parent Page is changed inside this event when I fire that event...
13
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format...
9
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. For a...
2
by: Chris | last post by:
I have a user control which is dynamically loaded into a placeholder. I have a formview in the user control In the page load event of the user control I wand to find a dropdown in the formview....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.