Skip to main content

Posts

Showing posts from May, 2015

Featured Post

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

How to bind html table in asp.net c#

In previous article we have already learn about binding but all they have a data bound control like Gridview, FormView etc. Today i am talking about html table. In my previous article , i was already write something about html tag and their uses also write that how to use html tag in code behind file of webform. In this article we have new concept that is StringBuilder class. By the help of this class we can do any changes in single object. I mean to say that a single object hold large string. Now see a simple example of html table binding: Source Code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div> <asp:PlaceHolde

How to delete row of Gridview using Link button in ASP.NET C#

Good morning friends, I have covered many article on Gridview binding. Today i am talking about Gridview with link button.In this article we will do something different like delete row when we press the delete link button. To do this task, first to design the Gridview with link button after that perform some operation on link button. Source Code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> <script> function ConfirmationBox(countryname) { var finalresult = confirm('Are you sure you want to delete' + countryname + 'details'); if (finalresult) { return true; } else { return false; } } </script> </head> <body>     <form id="form1" ru

How to design online examination project in asp.net c#

Before design the system, must to prepare the database. If you want to design the database then must to know about the system requirements so I have a system requirements: Hardware System : Core i3 processor for better performance. Software System :  Visual studio 2013 or higher like visual studio 2015 CTP. Application Requirements : Design a software application through which we can conduct exam online, in which we have two module, one for students and one for administrator. In the student module, first to authorized student login in the system after that choose subject by the pop up menu. After some time exam panel will appear on the screen, students can select one option at a time. After complete the exam student can see the own result. Also provide the help system to the student, in which an authorized person can put the query to the administrator. An administrator module provide some following function: 1.        Add new student 2.        Change password module 3.    

College website project in asp.net c#

College website project provide the right information to the existing student and new comers. The main aim of this project is to provide such types of information which is mentioned below: Current news Home slide section About panel  Contact us panel In this project i have two module, first is student module and last one is administrator module. Student can see all the details which is mentioned on the website. Through admin module we can update the website time to time , when we need. Home page of the website : Home page contains all such information which is important to the student and their parents. In this project we have two panel (left panel and right panel). In the right side bar we have news section , through which we give the right and updated information to the students also contain administrator login panel How to run the project under visual studio 2013 or higher . Hardware and software requirements Hardware : Core i3 pc Software  : Visual studio

How to create cookies in asp.net c#

If you want to create individual item cookie then use HttpCookie class , which is available in System.Web namespace. There are two object to use get and set cookie in the computer that are Request and Response. By using Request object  we can get the cookie from the computer and By using Response object we can create new cookie in the computer. Create cookie for individual item: HttpCookie cookie = new HttpCookie("mycookie");         cookie.Value = "Hello World";         cookie.Expires = DateTime.Now.AddMinutes(10d);         Response.Cookies.Add(cookie); Here, cookie is the instance of HttpCookie class, By using this we can invoke properties of this class. mycookie is a name of  the cookie. This cookie will expired just after 10 minute. Add new cookie by the Response object.  Retrieve cookie which is stored in computer      HttpCookie cookie =Request.Cookies.Get("mycookie");         Response.Write(cookie.Value.ToString()); Cre

How to load multiple data table in DataSet

ASP.NET C# : Load multiple data table in DataSet. If you want to add multiple table in DataSet then need two SqlDataAdapter for DataSet. Source code : <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>       </div>         <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add multiple table in dataSet" />         <asp:GridView ID="GridView1" runat="server">         </asp:GridView>         <br />         <asp:GridView ID="GridView2" runat="server"></asp:GridView>     </form> &

Hyperlink field Example of ASP.NET Grid View

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>             <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="JobId" DataSourceID="SqlDataSource1">             <Columns>                 <asp:BoundField DataField="JobId" HeaderText="JobId" InsertVisible="False" ReadOnly="True" SortExpression="JobId" />                 <asp:BoundField DataField="JobName" HeaderText="JobName" SortExpression="JobName" />                 <asp:BoundField Da

Implementation details of online examination system in asp.net c#

According to my ASP.NET online examination project there are following implementation details, these are: 5.1 Imp le mentati o n Impleme n tat i on of the project is t he t opi c s illustra t ed in the d e sign prototy p e and t he r e quireme nt s stated i n t he analyses sec t ion.   I n order to b e t t er ill u str a te what h as been done pict o rially, s o me scre e n sh o ts illustra t ions will be p resente d . O n the o t her h a nd relat e d d a ta uti l i zations in t he proj e ct have b een impleme n ted   using    SQL Server 2008   f o r   data   s t orage   and   data   retrieval   purpo s es   f o r   database int e rf a ces. 5.1.1 Screen implementation Home page: The   project   sta r ts   with   an   ini t ial   a p pli c ation   sc r een   of   " h o m e   p ag e "   w here   ma i n   menu   bar   a nd welcomi n g p age is illu s trated. Login and registration: Any user can view