Access to Login ASP.Net Login control objects, code behind

This post is about Web Forms. We still have some legacy applications using that platform. Although our main direction is MVC, we still support them. Here a sample for the subject matter:

RequiredFieldValidator req1 = Login1.FindControl("Req1") as RequiredFieldValidator;

req1.ErrorMessage = "My text";

var text = CCContent.GetStringContent("MustRegisterPassword");

RequiredFieldValidator req2 = Login1.FindControl("Req2") as RequiredFieldValidator;

req2.ErrorMessage = text;

 

In the case of req2 assignment of variable text, I obtain that text from a static method in our code. That access our Zgura’s content management framework. This content framework stores local or specific content for different applications. It uses a NoSQL repository for the data (Azure Tables) and will be matter of separated post.

Cheers,

Danfer.

Leave a Reply

Your email address will not be published. Required fields are marked *