Validating date in asp net c

29 Apr

I am assuming that I have to play with record of persons (First Name, Last Name, Age) and I will refer only these data through out this article. just to give you flexibility to not show scroll bar for long screens.For the ease of understanding, I have created BAL, DAL into the App_Code folder. pre 2) Can you post other similar article with Ajax? Because in practice we expect the delete to be performed with confirmation and also in details screen. Add new / Edit in 2 different tab panels - to have better usability. Regards, Sreedhar Thanks Vansree for your suggestions. Regarding pre class, I will let the webmaster know about it. As far as article on Ajax is concerned, I will try my best to post few articles on Ajax in coming days. Regards This is simpler example for 3-Tier Architecture. Sql Client; /// In the above code, I have a member variable called conn Str that is getting database connection string from my web.config file that is being used through out the class. Code for Grid View Data Key Names="Person ID" Auto Generate Edit Button="True" Auto Generate Columns="False" On Row Editing="Edit Record" On Row Updating="Update Record" On Row Canceling Edit="Cancel Record" On Row Deleting="Delete Record" Page Size="5" Above method will fire when Delete link will be clicked on the Grid View. To list the record into Grid View that will also enable us to Edit, Delete record, copy paste following code.Otherwise it will return a response with status code 401 (Unauthorized) and it won’t return the resource.

For any sub subsequent request for the same resource the code will not check credentials because we have created principal for this user and he is already authenticated.

By using fiddler we need to create the base64-encoded string which contains the “username:password” and send it along with the authorization header, to generate this string we will use as the image below: Note that this is not encryption at all, so as we stated earlier, using Basic Authentication should be done over SSL only.

Now we will use the encoded string to pass it in authorization header “Authorization: Basic VGFpc2Vlckpvd WRla Dp ZRUFSVk ZGTw==” the request will be as the image below: The response code will be 200 OK and will receive the specific data for this authenticated user.

As we don't have any business logic here so simply instantiate the Person DAL3 class of DAL and call methods. Now we have all set to go, now just run your project and try inserting records.

Now, create a class named Person BAL3 into App_Code folder by right clicking it and write respective methods for calling Insert, Delete, Update and Load methods of Data Access Layer class file (Person DAL3) (In my case I have a 3-Tier folder inside App_Code folder, you can directly add inside App_Code or you can create a separate project for BAL and add reference of this project into your Presentation Layer). In the above method, I am instantiating Person BAL3 and calling the Update method by p[assing required parameters.