Question : javascript buton click

I have a web modal dialog box that is retuning an argument to its parent window.  The return value is a stateabbreviation.  I iterate through a dropdownlist in javascript and select the appropriate state, then simulate a button click to post back the page.  That all works fine and the page is posted back  and my event handler for the button fires.
In the event handler I get data from the database and fill a grid view with data.  The problem is the grid view DOES NOT update when the page is returned to the client.  Below is the javascript code.  I have put a break point in the event handler for the button and it does fire off the grid view just does not update.  I thought that perhaps it was a cacheing issue so added the

it the head section of the page.  
also below is the code in the event handler for the button. I look at the taxes data table in the GetTaxes() method and all the data is there!  
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
var rc = new Array(0,0);
        function showDialog(taxlevelid)
        {
            rc = window.showModalDialog("TaxDialog.aspx?lid=" + taxlevelid ,"","center:yes;dialogHeight:300px;dialogWidth:575px;resizable:no;status:yes;");
            if(rc[0] != null)
            {
                //
                
                var sl = document.getElementById("dropDownListState");
                for(i=0;i
           
Open in New Window Select All

Answer : javascript buton click

No I solved the problem!  
On the click event for the button need to return false from the javascript so that the button itself did not cause a second postback event to be added to the events.  What actually happend was this senerio
1.  The javascript click event caused the postback, and the asp.net button control sent a postback to the server.
so
page_load is called
the event handler is called
then page_load is called again.
Then the page is fed back to the user hence with nothing in the gridview.

This was a good one and thanks for the help!!!!!!  It lead me to the right conclusion!
Random Solutions  
 
programming4us programming4us