[ jamaican83 @ 15.08.2011. 19:46 ] @
Pozdrav pocetnik sam u ovome i pokusavam da napravim jednostavnu pretragu baze , tipa upise se zadati parametar izvuku se podaci putem upita iz baze i prikazu u tabeli. Vec sam jednom tako nesto uspeo da napravim i radilo je medjutim ovog puta kada klinkem na dugme nista se ne desi, kao da se stranica samo refresuje i to je to , nikakav podatak se ne prikaze pa ako neko moze da mi kaze gde gresim i sta propustam ovog puta bio bih mu zahvalan. Deo frontenda <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RIL_FilijalaConnectionString %>" SelectCommand="SELECT * from ol AND (OL.JMBG = @TextBox1) "> <SelectParameters> <asp:ControlParameter ControlID="TextBox1" Name="TextBox1" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="PoĊĦalji" /> <asp:GridView ID="GridView1" runat="server" EmptyDataText="Nema podataka"> </asp:GridView> Backend Public Class About Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox1.TextChanged End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click GridView1.DataSource = SqlDataSource1 GridView1.DataBind() End Sub Protected Sub SqlDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource1.Selecting End Sub Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles GridView1.SelectedIndexChanged End Sub End Class |