CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 2/14/2008 12:29:30 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 26 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
gary1975
Asp.Net User
Loginview and FindControl2/14/2008 12:29:30 PM

0/0

Hi

I have a problem since I implemented a Loginview in my Master page, it seems to be causing problems with accessing controls in the content pages. I  used to change the default mode of my DetailsView control using:

dvSoftware.DefaultMode = DetailsViewMode.Edit
But since I implemented the LoginView I am getting the error 'Object reference not set to an instance of an object'.

I read up a few posts and they mentioned about using findControl, so I did: 

Dim lv As LoginView

lv = CType(Master.FindControl("LoginView1"), LoginView)

Dim dv As DetailsView

dv = CType(lv.FindControl("dvSoftware"), DetailsView)

dv.DefaultMode = DetailsViewMode.ReadOnly
But I am still getting the same error at the  dv.DefaultMode = DetailsViewMode.ReadOnly line

 

Any ideas?

Thanks

Gary

XiaoYong Dai –
Asp.Net User
Re: Loginview and FindControl2/18/2008 5:38:32 AM

0/0

Hi

Could you paste more code snippet so that we can find some clue?


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Essential ASP.Net 2.0 Authors: Fritz Onion, Keith Brown, Pages: 345, Published: 2006
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Beginning ASP.NET 3.5: In C# and VB Authors: Imar Spaanjaars, Pages: 734, Published: 2008
ASP.NET AJAX Programming Tricks Authors: Matthew David Ellis, Matthew Ellis, Pages: 388, Published: 2007

Web:
LoginView.FindControl not finding control - ASP.NET Forums Apparently the FindControl method of the LoginView control isn't actually finding the control. Any ideas why not? ...
ASP.NET QuickStart Tutorials LoginView FindControl Template Sample. In this sample FindControl is used to access the selection of a DropDownList within the Admin template and display ...
Accessing a control within LoginView authenticated or not and then use the LoginView.FindControl( stringId) together with the sub control's ID to retrieve the control reference. ...
LoginView.FindControl Method (System.Web.UI.WebControls) LoginView . FindControl Method. Updated: November 2007. Overload List ... You should not override this version of the FindControl method. ...
newbie: Problems with LoginView Set the Checkbox to true Jack. "Jeff" <> wrote in message news:%... > Hey > > I' ve just solved the problem by using LoginView.FindControl(); ...
loginview + FindControl not working for me. - ASP.NET Forums I do not know why but if you have a LoginView the FindControl will not work. If you do:. MasterLoginView.Controls[0]. ...
[Mono-bugs] [Bug 81344][Nor] New - LoginView.FindControl does not ... FindControl does not find control in LoggedInTemplate + +I have a LoginView declared on a page, and need to access a control in the ...
ASP.NET Debugging : Loading a control in a Login Control may give ... If the user is not authorized to see what is inside the LoginView, then those controls won't exist. For example, FindControl("Multiview1") could return null ...
problem with FindControl - .NET ASP If you are running this on the content page, you don't need tom FindControl the LoginView. You can just Dim tb As TextBox ...
ASP.NET access user control in masterpage. : ASP.NET, any, n/a Okay, all you gotta do is add another findcontrol inside the loginview, once you 've found the loginview - so: Dim loginview1 As LoginView = Master. ...




Search This Site:










how to do "select top 1 customer from customers" in linq to sql?

2 questions about membership providers and web.config

user.identity.name works in single aspx page, doenst work in use with masterpage

deactivating users?

paypal and dnn 3.0.13

specified cast is not valid

alternative to popups?

file access problem

asp.net counter help?

file manager new feature !! or missing ?

forms authentication unauthorized redirect

how to get this html address http://www.domain.com/temp/book__3j1v4k4lj7lh3e3p4l6li5h__.htm

converting content from other blogs

label in ascx component

question on user defined table

portal authentication

visibility displaying when turned off in the module settings.

using the dnn utilities.calendar class

placing web controls where i want

duplicating table and formatted entries

automatically replacing sections (i.e. applicationsettings) in the web.config

ad authentication dealing with unusual password characters

disabling mouse wheel

trouble uploading module to site.. please help

help with a composite control

horribly slow built time

checkboxlist and selectedindex

default.aspx doesn't work, but all other pages does?!

master page bug?

easiest way to format true/false to yes/no

 
All Times Are GMT