all groups > asp.net datagrid control > december 2005 >
You're in the

asp.net datagrid control

group:

How to connect button event and datagrid in different files


How to connect button event and datagrid in different files mohit
12/21/2005 8:16:34 AM
asp.net datagrid control: Hi,
I have two files : Text.aspx and Default .aspx.
Default.aspx has a Detagrid web control and Text.aspx has a Button web
control.

For this buttton event I want something like if I press the button it
should cause to increase the datagrid of the Default.aspx by one row.

How to do this ???

Any ideas ???
Re: How to connect button event and datagrid in different files Elton Wang
12/21/2005 1:15:24 PM
Basically, web application is stateless, unless you record page state in
someway, e.g. Session, Cookies, and so on.



My idea is that when Default page open you record the datagrid state, e.g.
row count, in Session or Cookies. Then in Text.Button click event reset the
state, and redirect to Default page. In Default page load datagrid based on
state in Session or Cookies.



HTH





[quoted text, click to view]

AddThis Social Bookmark Button