Previous Page Problem
-
i am using this to redirect GridView2.DataSource = dummy_rules; GridView2.DataBind(); foreach (GridViewRow row in GridView2.Rows) ((LinkButton)row.Controls[0].Controls[0]).Attributes.Add("onclick", "window.showModalDialog('CreateRule.aspx?new=editM',null, 'status:no;dialogWidth:555px;dialogHeight:425px;di alogHide:true;help:no;scroll:no')"); the dialog box appears but i need the gridview there.........but when i use Prevouspage it throws exception Object reference not set to an instance of an object i have added the directive ]]>;
-
i am using this to redirect GridView2.DataSource = dummy_rules; GridView2.DataBind(); foreach (GridViewRow row in GridView2.Rows) ((LinkButton)row.Controls[0].Controls[0]).Attributes.Add("onclick", "window.showModalDialog('CreateRule.aspx?new=editM',null, 'status:no;dialogWidth:555px;dialogHeight:425px;di alogHide:true;help:no;scroll:no')"); the dialog box appears but i need the gridview there.........but when i use Prevouspage it throws exception Object reference not set to an instance of an object i have added the directive ]]>;
What do you mean, "the dialog box appears but i need the gridview there"? You want a gridview in the createrules.aspx page that appears in your modalDialog? What are you trying to accomplish with the PreviousPageType, and why is it in a CDATA ?
only two letters away from being an asset
-
What do you mean, "the dialog box appears but i need the gridview there"? You want a gridview in the createrules.aspx page that appears in your modalDialog? What are you trying to accomplish with the PreviousPageType, and why is it in a CDATA ?
only two letters away from being an asset
i have added %@ PreviousPageType VirtualPath ="~/StartPage.aspx" % in my dialog page i want to access Gridview of StartPage.aspx which is the previous page but in the dialog page the previous page is null Thanks
-
i have added %@ PreviousPageType VirtualPath ="~/StartPage.aspx" % in my dialog page i want to access Gridview of StartPage.aspx which is the previous page but in the dialog page the previous page is null Thanks
Do you need to access the control or the data in the control? PreviousPage is of course going to be null because you are opening the page via a JavaScript function. There is no Postback occurring for ASP.NET to set the value.
only two letters away from being an asset
-
Do you need to access the control or the data in the control? PreviousPage is of course going to be null because you are opening the page via a JavaScript function. There is no Postback occurring for ASP.NET to set the value.
only two letters away from being an asset
i want to access the data of the gridview controll.
-
i want to access the data of the gridview controll.
Then call the same method you use to populate the grid on the first page. :rolleyes: :rolleyes:
only two letters away from being an asset
-
Then call the same method you use to populate the grid on the first page. :rolleyes: :rolleyes:
only two letters away from being an asset
i want to get column2 value of the selected row on startPage.aspx
-
i want to get column2 value of the selected row on startPage.aspx
So pass the id of the row as a querystring to the page you are trying to open. Then get the data and access that row. It really isn't as difficult as you are trying to make it.
only two letters away from being an asset
-
So pass the id of the row as a querystring to the page you are trying to open. Then get the data and access that row. It really isn't as difficult as you are trying to make it.
only two letters away from being an asset
thanks but the actual problem is this i have a number of controls not only the gridview...... i thought there may be a way to access values of controls instead of passing values of all the controls in querystring
-
thanks but the actual problem is this i have a number of controls not only the gridview...... i thought there may be a way to access values of controls instead of passing values of all the controls in querystring
PreviousPage property of the page is set only if it is requested as a result of cross page post-back. In your case you are redirecting from the other page using modal dialog or smth like that. To have a cross page post back you can set PostBackUrl property of your LinkButton to the second page instead of setting onclick handler as an attribute. However in this case you won't have the modal dialog.