Skip to main content

Posts

Showing posts from November, 2013

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 });             }            

Windows 8 App Development: How to use HyperlinkButton in c# code file

In my previous article, i have discuss hyperlinkbutton with XAML code in windows 8 app development. In this article i will explain use this button in c# code file. Write the below code in specified file: XAML CODE <Page     x:Class="App4.MainPage"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:local="using:App4"     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     mc:Ignorable="d">     <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">       <HyperlinkButton x:Name="h1" Height="200" Width="257" Content="Microsoft Development Network" Margin="90,20,0,548" Click="h1_Click" />     </Grid> </Page> C

How to add Styles to an HTML Document

Introduction Rules can be applied to an HTML document in three ways, as inline style directions, as a style element embedded in the head section of HTML file and as an external file that can be either linked to or imported into document. Inline styles Style information can be added to an individual element by adding style attribute within HTML tag of that element. Value of style attribute is one or more standard style declarations, as shown here: html page code <! DOCTYPE html > < html xmlns ="http://www.w3.org/1999/xhtml"> < head >       < title ></ title > </ head > < body >< div style =" font-size : large ; font-weight : bolder ; font-style : normal ; color : #FF0000 ; background-color : #FFFF00">     Hello World     </ div > </ body > </ html > Although a perfectly valid use of style information, inline styles are equivalent to <font> tag in the &qu

How to use HyperlinkButton with XAML in Windows 8 App Development

HyperLinkButton, used to open the specified URI in the default browser. URI can be specified in NavigateURI property of this button and it will launch that by clicking on that button. This button look like a text with underline. This button opens another page side by side in windows 8 app development. Here's the XAML code which will create this type of button: <Page     x:Class="App4.MainPage"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:local="using:App4"     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"     mc:Ignorable="d">     <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">          <HyperlinkButton x:Name="h1" NavigateUri="http://msdn.m

How to make custom login control in asp.net programming

Introduction about security of your web page in asp.net programming You have been familiarized with the process of creating websites of your choice. However , only creating a website is not enough, one have to secure from unauthorized users. Such users can access and steal vital information of other users or about secret info of website such as credit card numbers and email-ids. Considering these factors, it is necessary to secure the websites from malicious users. To implement security, we must be able to track the user who visit the website and allow only authorized users to access the website resources. For tracking users, we need to collect some required information (such as name, email id, and contact no.) including username and password. Users are required to furnish username and password to authenticate them as valid/registered users.To fulfill these tasks, we need to create a user interface for authenticating the user, and displaying the desired page based on the roles o

Unformatted Input/Output Functions with Example: C Language

In our earlier post i have discussed about sequential and compound statements . Now in this post we will discuss about unformatted i/o functions. There are several standard library functions available in this category - those that can deal with a single character and those that can deal with a string of characters. The various unformatted input/output functions in C are shown below: getchar( ) and putchar( ) Even though getchar( ) and putchar( ) looks like functions, they are not. They are the macros that are used to read and display a character. The syntax to read a character shown below: “ch = getchar( )” will reads a character from the keyboard and copy it into memory area which is identified by the variable ch. No arguments are required for this macro. Once the character is entered from the keyboard, the user has to press Enter key. “putchar(ch)” outputs a character stored in a variable on the monitor. The variable should be passed as parameter as shown in the above sy

Windows Store App : How to use Grid in XAML

Introduction By-default a Grid element has one row and one column i.e. a single cell, any control placed inside the Grid will be placed in this cell. Lets see the below simple XAML code where a textbox is placed in the first row and first column. Programmer is not specifying here, but it have value of Grid.Row as well as Grid.Column property to zero. < Grid Background ="{ StaticResource ApplicationPageBackgroundThemeBrush }">          < TextBlock Text ="Hello World" /> </ Grid > How to Insert multiple Rows and Columns in Grid Step-1 : Create <Grid.RowDefinitions> and <Grid.ColumnDefinitions > inside the Grid.    < Grid Background ="{ StaticResource ApplicationPageBackgroundThemeBrush }">         < Grid.RowDefinitions >                       </ Grid.RowDefinitions >         < Grid.ColumnDefinitions >                       </ Grid.ColumnDefinitions > </ Grid