Hi i've made a webpage which i want to display the text on the buttons in the language of the person that is logged in. I can do this by using a repeater but then when you click one of the buttons everything between my repeater becomes invisible.
If someone has an idea of what i have to change in my code.
Sub Button1_Click(sender As Object, e As EventArgs)
Response.redirect("Personeel2.aspx")
End Sub
the following is the code that i use to populate the repeater, i don't think that this gives the error but i posted it anyway.
Dim toConn as oledbconnection
Dim toCmd As OleDbCommand
Dim tsSQL As String
toConn = new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\toConn.open()
dim intac as integer
intac = cint(val(strx))
tsSQL = "SELECT * FROM tbltaal WHERE [TaalID] = " & intac
toCmd = New OleDbCommand(tsSQL, toConn)
'Dim toDA As new OleDbDataAdapter (tocmd)
'Dim toDS As New DataSet
'Get a datareader
Dim objDataReader as OleDbDataReader
objDataReader = toCmd.ExecuteReader(CommandBehavior.CloseConnection)
rptTaal.DataSource = objDataReader
rptTaal.DataBind()
objDataReader.Close()
toConn.close()
and the following between the body tags, which is probably the problem with the onclick event but i have no idea what i have to change
<asp:Repeater ID="rptTaal" runat="server" EnableViewState="false">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text='<%# Container.DataItem ("Button1") %>' onclick="Button1_Click" Width="100" Height="30" ></asp:Button><br>
</ItemTemplate>
</asp:Repeater>
So everything works apart but not together.
Already thanks.
Borracho
If someone has an idea of what i have to change in my code.
Sub Button1_Click(sender As Object, e As EventArgs)
Response.redirect("Personeel2.aspx")
End Sub
the following is the code that i use to populate the repeater, i don't think that this gives the error but i posted it anyway.
Dim toConn as oledbconnection
Dim toCmd As OleDbCommand
Dim tsSQL As String
toConn = new oledbconnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=C:\Inetpub\toConn.open()
dim intac as integer
intac = cint(val(strx))
tsSQL = "SELECT * FROM tbltaal WHERE [TaalID] = " & intac
toCmd = New OleDbCommand(tsSQL, toConn)
'Dim toDA As new OleDbDataAdapter (tocmd)
'Dim toDS As New DataSet
'Get a datareader
Dim objDataReader as OleDbDataReader
objDataReader = toCmd.ExecuteReader(CommandBehavior.CloseConnection)
rptTaal.DataSource = objDataReader
rptTaal.DataBind()
objDataReader.Close()
toConn.close()
and the following between the body tags, which is probably the problem with the onclick event but i have no idea what i have to change
<asp:Repeater ID="rptTaal" runat="server" EnableViewState="false">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text='<%# Container.DataItem ("Button1") %>' onclick="Button1_Click" Width="100" Height="30" ></asp:Button><br>
</ItemTemplate>
</asp:Repeater>
So everything works apart but not together.
Already thanks.
Borracho