Jean
|
| Posted: 07/10/2002, 8:21 PM |
|
Hi,
I am using C#/ASP.NET. I have a tablename_list.aspx and tablename_maint.
Instead of using link to expose my data in URL. I wanted to "post" instead.
However, the button I setup, I used the following method recommended by CCS
tech. support
1. Create a new column with a label on grid.
2. Create Before Show event for the form and assign Label field html code
that contains form, hidden field and button tags.
3. Then I added the following code in the Before Show
System.Web.UI.WebControls.Literal
tblMemberbtnProfile=(System.Web.UI.WebControls.Literal)(e.Item.FindControl("
tblMemberbtnProfile"));
((Literal)e.Item.FindControl("tblMemberbtnProfile")).Text= "<form name =
tblMember action = 'status_list.aspx' method = 'POST'><input type='hidden'
value='" + tblMemberbtnProfile.Text + "' name='IDMember'><input
type='submit' value='Edit'></form>";
// -------------------------
4. Everything works great except the button on the first row just igore the
form action and always redirect back to the current page. I looked the HTML
from run time brower, the correct form action is setup just the same as
other rows.
Please Help !
Thanks
Jean
|
|
|
 |
|