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...Relogin using different user , can access the previous user login page
Hi there ,
I am using ASP Net 2.0 and its login controls. I face security loophole in which within the same IE Window, the 1st user access a page and left for long time. And the 2nd user click on it and get redirect to login page. The second user login and can see the last page that the 1st user left.
Why ? Any workaround for this ?
When the user logs in the second time, they will by default be send back to the page that they were previously on. Note that they will be accessing the page as the second user ...Why must I give Authenticated Users rights to an aspx page to enable users to access it?
I am trying set up security on my application before deployment and I am having issues controlling acces to some pages. I'm using Windows authentication and Active Directory roles and I have security trimming enabled. I have a folder called Quality Control and there are 4 aspx pages within. I have given Authenticated Users the rights they need to see and open 3 of the 4 pages in the Quality Control folder. I remove Authenticated Users from one page (QcOnly.aspx) that I only want members of the Quality Control role to have access to and I gave the ...Authenticated users not getting access to secured pages????? What can I do?
Ok I have a simple login page using the login control. Once the user's name and password is found it should take them to main.aspx page. Only authorized users can access teh main.aspx page. Heres teh code for that:Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate Dim Authenticated As Boolean = False Authenticated = Authenticate(Login1.UserName, hashPwrd()) e.Authen...bug ?? Relogin with different user, can see the last access page of the previous user logout using LoginStatus ??
I still dont understand why when user click Logout on the LoginStatus link, it does not clean up his last page access. When another user ( with different role too) login using the same IE window, he get redirect to the previous user's last page access. Surprise to me and it looks like a security flaw.
And thus i have to manually put codes to run formauthentication.signout as what Asp.net 1.1 usually do !!
Why loginstatus does not clean up the last user session ?? And furthermore, is there any method in loginstatu...How to automatically send denied users to "access denied" page, instead of a login prompt only then to be sent to "access denied" page
My security works fine except for one small annoyance. This is an intranet site only and are using Windows (AD) authentication with Anonymous turned off. The 'good' users get right in, with no prompts. This is good. However, the 'bad' (denied) users get a prompt to enter their credentials only to be denied. I would like to eliminate the need for them to even try and enter credentials and send them directly to an "access denied" page (no prompts). It only wastes their time and aggrevates them.
Tha...Accessing Profile of users other than current user.
I want to access profile of other users. I want to allow my members to visit other members profile. I am not going to disply the senstive information. The default sql profile provider access to profile of current user only.
you need to use the getProfile function as follows:ProfileCommon UserProfile = Profile.GetProfile(UserName);
Please read this related thread :
Regards,Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wron...Users customise their profile page for all users
I am a bit of a newbie to ASP.NET. All my web development experience before has been with good old asp pages!
So anyways here's what I was wondering. I have a page called ViewProfile which displays the information about a particular user. The information is pulled from a users table stored in SQL server. The user profile displayed is determined by the id parameter passed in the url (for example - ViewProfile.aspx?id=123). This allows other users of the system to see another users profile (the appropriate links etc are on the pages).
Now here'...customvalidator on a user control UC1 when the user clicks a button located on a different user control UC2 on the page
I am maintaining page where a user control is initialized dynamically.
The user control UC1 has a customvalidator using server side validation. When the postback is caused by a button inside the user control UC1 causes the postback, the customvalidator works fine and I get my validation results displayed. However, If I click a button located on a second user control UC2 on the main aspx page, the validation doesn t execute and I get no result validation error displayed.
My question,how can I make the validation execute on the user control UC1 when the postback is caused by...Updatepanel
I have few tabs in my page, when user changes the tab, I am loading page contents Async'ly. I want to make all tabs are inaccessible to user during load time.
How can I ?
You can tap into the events of the PageRequestManager. It fires init, begin, and end request events when an async update occurs.
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(...Accessing user controls from pages within Master pages
I have a problem with a web-site I have built which users Master Pages. One of the pages has a userControl within it, and in the codebehind on the page being loaded into the master page, I access methods and properties on this control. All builds fine.
When I run it, the control does not load, and looking at the source code, the reason is that the control is prefixed with the name of the container of the master page, "ctl00_contentPage" which stops this control loading properly. As soon as I amend the HTML generated and delete this prefix from the cont...User access to a page
Can anyone point me in the right direction when it comes to allowing users to access certain pages only if they are privileged to do so. I am still in ASP mode and am not sure how to implement the whole privileged system for users to access their own account etc.
Any documentation I should go straight to?
What does the architecture look like? Is it simply the same as a regular ASP page where a session variable is checked for the right privilege level?
Thanks for your help!
I suggest you take a look at Rolebased Authorization which is far more advanced (but still easy) than ...Unable to access user control's user control's function\property from another user control
Hi, I used to call an user control's user control function as stated below from my user control in ASP.Net 1.1 wucCompany.wucEmployee.GetEmployeeSomething() After migrating to ASP.Net 2.0, I am unable to use any properties/functions(even the public ones) of the user control's User control's from another user control. The way I have to do is create property\function in wucCompany which calls the wucEmployee's property\function and call the wucDepartment.GetEmployeeSomething().Since I need to do this change in too many places, I can...Denying access to a page to certain users redirects to login page
I have an administration page in my web application (which uses Forms Authentication) and I've protected it by making an authorization rule in the web.config for that particular page. I've allowed one user access and denied all others by using the following:
<allow users="AdminGuy" />
<deny users="*" />