Calling a method from a control page on the axpx page where the control page exists.
I have an .aspx page that has a method called grdMain_DataBind(). I have a control page that loads within the aspx page which has its own logic. I have a button on my control page called "SAVE". How can I call the method grdMain_DataBind thats in my aspx logic from the control that exists on that page when I click SAVE button. Is there a way?
If I were you, I'd simply create a "Save" Event within your control. When the Button in your control is pressed, in the Click handler for that Button you can raise the event. Then, within t...accessing one page object to another page
I am new this site.
Please help me to below posted thing.Is there Is there a way to access one page's public properties from another page? I'm not referring to cross-page posting or accessing values from a previous page. B.V.V.Prasad
it is not so easy to do what you want. Why dont you, instead, save the value you want in the Session then acess it in the other page?Please, mark as answer if this post helped you"I am nobodyNobody is perfectTherefore, I must be perfect!"
Put all Public Properties in a separate Class for you to access that in every...Affecting a control on one page from another page
I have a page that is launched using showModalDialog, and I would like to change an HtmlInputCheckBox on the parent page when an event on the modal page is fired (in the code-behind). Is this possible, and if so, how? I've tried using Response.Write("<script>self.opener.document.forms.ApplyPhaseIn.checked=false;</script>") but this doesn't work, and I'm not sure how else to handle it. Any suggestion would be welcome.
No, this==> self.opener.document.forms.ApplyPhaseIn.checked=false; you have to p...How to access one user control from another user control on same page
hi,I have two usercontrol on same page. 1.ascx and 2.ascx on abc.aspx . Now I need to access dropdown on 1.ascx frm 2.ascx . Plz help me how can i do this?I have tried Page.findcontrol but as a user control inherits usercontrol class and not page class . its not giving reference to proeprty Page.Findcontrol. I can do page.findcontrol on aspx page but I need to do it on ascx only.plz helpregards,max
Hi Max, you have to expose your DropDownList as a public property which lays inside usercontrol 1. Example: 1 class MyUserControl1 : UserControl
4 p...Problem Accessing Page Controls in a page that has a master page.
I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).
The controls structure is.. MasterPage > PlaceHolder > MyPage.aspx
&n...how to access a textbox value from one page in another page.......
Hello All,i have a textbox with a value = "A12C" in a page called reivew.aspx.how would i be able to access this textbox value in another page called confirm.aspx.can someone please let me know Thanks a lot
You can do it a few different ways.
If the review.aspx send the user directly to confirm.aspx once the user clicks a button, you can set the post back url of the button to "confirm.aspx".
Or...once again if confirm.aspx comes after review.aspx, you can use "PreviousPage" to access the value.
Or...you can store the value of the te...How to access a menu that a exists in a master page from other page (VB.net)
Hello, I have a menu in the master page and I want to refer to this menu from another page (to be precise I want to refer to a menuItem of this menu -childItem).
I tried something with code (Vb.net) :
Dim mymenu As Menu = FindControl("menua") ----- Where menua is the id of my menu in the master page
but then when I tried to use the variable mymenu I cannot access the menuItem I want.
Generally, I would like to know if someone has a sample of code with which I can refer to the menu that exists in the master page (and also access th...get data from Gridview in one page to textboxes in another page.
Hi here iam having Gridview in one page .it is binded to some data.I used querystring to transfer data from Gridview to Textboxes in next page.now my question is i want to edit the textboxes and make changes reflect in database.i edited the textboxes by just deleting the value in Textbox and entering new value.but The changes i made to textboxes are not reflected at runtime.When i debug the codeThe values in TextBox are previous values. The changed values are not reflected.because of that iam not able to update the database.Is there property for textbox to take place the changes i made...Accessing one page class Type from another page or object
This may be more of a design question but here goes. I can't access the Type of any of my webforms classes from outside of the webform class itself. This is despite the class being marked public (.Net default). I can't even access the Type for casting a Page class object.
1. I have a webform MyPage.aspx that implements an interface IMyPage.2. I have a ValidationFactory class with a generic, static factory method GetValidationObject<T>(T objectToValidate). This returns a generic, abstract ValidationObject<T> class.
3. I have a validation class MyPageValidator t...How to databind control in one web page from another web page
I have a listbox control and a button control in a web page. Once the user clicks the button another web page is opened.
The new web page will accept some data from the user which will be used to databind the listbox in the first web page.
In other words, the two web pages ( the parent window and the child window) are open at the same time. The child page needs to databind a control in the parent page.
Is there a way to do it?
I need some code.
Thx in advance
I hate to do this.
Looks like I will have to take help of viewstate and session si...Update controls from one page to another aspx page on a frame
I've a frame page called default.aspx that has a left panel as navigation and the content page. When I first start the application, the content page is loaded with login.aspx page for user to login, however, when I first load the default.aspx page, I would like all controls (hylerlink and button) on the left panel be disabled until the user is loggin. So my question is that how do write script to enable the left navigation page one the user successfully authenicated. Which mean updating controls of another page. Is it possible?
Thanks,...how I can have access a control of one another page?
I have two pages and I need to have access the control that is in another page (Parent).
Normally you can access it like a property Pagename.control but this makes definitly no sense. Because if you load the page then it is losing all it values because of the page lifecycle. So you should fill controls on loading the new page with help of querystrings or sessions...response.redirect("default2.aspx?value=abc");other page:textbox1.text = request.querystring["value"].toString();Please: Don't forget to click "Mark as Answer"...only allowing a user to access one page after they have visited another page first.
Hi guys, I hope this makes sense. I have a page that the user gets sent to once they have visited another page. I want to be able to stop the user from entering the second page's URL in to the address bar and accessing it. so i assume i should use sessions that is created on the first page and must exist for the user to access the second page? not really sure how to go about it. thanks
You can place this code in Page_load event:
if Not Page.Ispostback() thenif request.servervariables("http_referer")<>"ThePageIWasSupposedToComeFrom.aspx" t...How to get the value from one page to another page when i use response.redirect
Hi,Try below code in your webform2.aspx. Private Sub Page_Loa...