How can I go about adding a parameter to a datasource at runtime? I am using VB as code. Here is what I have but it doesnt work.
VB Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If Not TextBox1.Text = "" Then AccessDataSource2.SelectParameters.Add("City", TextBox1.Text) End If AccessDataSource2.DataBind() End Sub
City is the column name in the database.
Thanks!