FINDCONTROL PROBLEM

I

in da club

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
 
T

Teemu Keiski

Hi,

it doesn't give you the value that was databound to it? Is it empty value or
what?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top