views:

11

answers:

1

Okay the question is not exactly straightforward: let me explain.

I have a gridview, that I have hooked up to a datasource and all is peachy. I need to open a more detailed page for each row, so what would be the best way to do this? Currently I have something like this in the onRowDataBound function:

    if (e.Row.RowType == DataControlRowType.DataRow)
        try
            e.Row.Cells[5].Text = "<input type='image' src='images/more.png' width='20' alt='More...' onClick='test(\"" + e.Row.Cells[1].Text + "\");' />";

The test function would take the parameter, plus use some values of some controls on the current page to cause a new window to open with data POSTed to it. Is this possible? Currently my test function doesn't do much:

    function test() {
    var argv = test.arguments;
    window.open('Details.aspx', 'more', 'width=300,height=200,resizable=yes,toolbar=no');
}

I'd like it to open Details.aspx with argv data POSTed to it. Anyone?

A: 

There are two way to post data to server

1) Either put your data to url after "?" ( GET Request ) 2) Either Put data in body of your request ( POST/PUT/DELETE Request )

In your case you only have first one as your just opening a link in new page.

So just your data in the query string like

http://yourdomain.com?a=val_a&amp;b=val_b

Dinesh Atoliya
Yes, that's the GET method. I would like to POST these variables. Is there no way to do that with my current setup? What would I have to change to POST the data, so no one can hack the URL?
Freakishly