AboutSyed Rizwan Muhammad Rizvi Expertise I can answers questions regarding web based and desktop based programming in VB.Net. Which can include SOAP, XML, Custom Controls, COM Interoperability etc.
Experience Have been working in this specific area for last 2 years previously I was a VB 6 Developer with experties in other languages as well. Total 10 years of programming experience.
Thanks for the assistance. I set AutoPostBack to true, but upon execution of the program got the following error(I got the error even when AutoPostBack was not set to true):
Error 1 Method 'Protected Sub DropDownList1_SelectedIndexChanged(sender As Object, e As System.Web.UI.WebControls.GridViewCommandEventArgs)' does not have the same signature as delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'.
My expectation for webform three is that the GridView appears upon selecting a state in the dropdown list. Both the gridview and dropdownlist are connected to the PUBS database in SQL Server 2000. Would it be possible to show you the webform by zipping the file and emailing to you? If so then perhaps doing that could offer clarification on what I am trying to accomplish.
Sachin
-------------------------
Followup To
Question -
Hi Syed,
I have the code from the third web form here. Hopefully it may clarify what I was talking about in my last email.
Here is the VB:
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs)
Session("state") = e.CommandArgument
If GridView1.Rows.Count > 0 Then
GridView1.Visible = True
End If
Also here is a custom SQL statement that I created for the Gridview1 so that it would display the data as soon as I chose a state from the dropdown list:
select * from authors where au_id IN (select au_id from titleauthor where state=@state)
Hope this helps. Thanks again!
Sachin
Answer -
By default the DropDownLists AutoPostBack property is set to false, pls. ensure that its set to true.
if thats not the problem then please explain what do you expect and where is it failing your question is quite vague otherwise.
Answer you cant modify the signature of the DropDown's SelectedIndex change event.
The header for the event handler should be
(sender As Object, e As System.EventArgs)
and not
(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs)