Skip to main content

Posts

Showing posts from September, 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 });             }            

fire event inside another event using JQuery

Introduction In this article i will show you how to fire event inside event using JQuery. I will give an example of it. In this article, first we create a table using JQuery then append the table with the dynamically created table. First, we get the column of the table for inside event then generate function on table row. Lets check the example. Source code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="browserdetails.aspx.cs" Inherits="browserdetails" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://code.jquery.com/jquery-1.10.2.js"></script>     <title></title>     <script>           $(function () {             $("#btncreate").click(function () {                 var newtable = '<table id="mytable"><tr><td>Column1</td><td>Column2</td></tr>&l

Open and close new window using JQuery

Introduction In this article i will show you how to open new window when we click on button using JQuery. I will give an example of it. Also do some thing like when we click on other button then opened new window will closed also mentioned in the example. Description I have explained Get browser details using JQuery , Button work as fileupload control in JQuery . Source code <!DOCTYPE html> <html> <head>     <title> OPen and close window using JQuery </title> </head> <body>     <form name="form1">         <input type="button" value="Open New Window" id="btnOpen" />         <p> <input type="button" value="Close New Window" id="btnClose" />     </form>     <script src="https://code.jquery.com/jquery-2.1.4.js"></script>     <script type="text/javascript">               var Window1;      

Get browser details using JQuery

Introduction  In this article i will show you how to determine which web browser is selected for your application or you can say that how many user open your website in which web browser. Through this article i will show you Browser type, Browser version etc. Lets check the example of getting browser details using JQuery. Description In previous article i explained Button work as fileupload control in JQuery   ,  Select box validation using JQuery  ,  JQuery TextBox validation when it empty ,  Retrieve selected Radio button and checkbox value using JQuery ,  How to show popup on page load using JQuery  . Code Example: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="browserdetails.aspx.cs" Inherits="browserdetails" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://code.jquery.com/jquery-1.10.2.js"></script>     <script src

How to deploy windows phone 8.1 application to device

If you want to run your windows phone 8.1 application to your physical device or you can say phone that you can follow these instruction which is mentioned below: 1. Search windows phone developer registration 8.1 from your window start screen. 2. Register your windows phone now. 3. After successfully registration, set platform of windows phone by build menu in visual studio like: 4. Select Platform as "ARM" from Dropdown option.  5. Now, connect your phone with your computer from USB cable. 6. Run your application.

Bind DataList from database in asp.net c#

Introduction In this article i will show you how to bind dataList from database table. Also i will give an example of it. In this example i will set the orientation property of items also set columns which is appear on the web page. The DataList Control The DataList control is a Data bound control that display data by using templates. These templates define controls and HTML elements that should be displayed for an item. The DataList control exists within the System.Web.UI.WebControl namespace. Now , lets take an example. How to bind DataList Control using the SqlDataSource Follow some steps for binding Datalist to SqlDataSource . Steps same as Previous post . Basically SqlDataSource is used to connect front-end to  back-end using connection string . Connection string  saved in configuration file. Now , After establishing connection you have to use property builder through ShowSmart tag. Select Property Builder link , Now after selected a new window will open 

Display sum of Columns total in GridView Footer in ASP.Net using C#

Introduction In this article i will show you how to show total of all rows of GridView column. I will give you an example of this problem.Suppose you have a one numeric type columnn in your data table and you want to add all column values.Also display sum of column in footerRow of the GridView. If we think about algorithm for this type of problem. Algorithm say that first we take a Gridview with Two template  field , One template field have one item template and one footer template such as   <asp:TemplateField HeaderText ="Name">                 <ItemTemplate >                     <asp:Label ID="Label1" runat="server" Text='<%# Eval("namet") %>'>                     </asp:Label>                                 </ItemTemplate>                 <FooterTemplate >                     Total:                                   </FooterTemplate>             &l

Example to create tooltip using code in windows form c#

Introduction In this article i will show you , how to generate tooltip on controls using c# code. By using tooltip we can put some hints about task. I will give you an example of ToolTip in windows form c#. In this article we will use ToolTip class with their SetToolTip method. Description In Previous article i explained how to generate tool tip on each item of Dropdownlist in asp.net . Code using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication2 {     public partial class Form6 : Form     {         public Form6()         {             InitializeComponent();             settooltip();         }         private void settooltip()         {             ToolTip tip = new ToolTip();             tip.SetToolTip(this.button1, "Defau

Change windows phone 8.1 app icon

Introduction In this article i will show you how to change windows phone 8.1 app icon using manifest file. You can set your image file in place of default icon file. The default app icon file looking like cross square. I will provide you step by step guide to change the icon file or you can say image file. Double click on Package.appxmanifest file. Select Visual Assets tab. Add new image in Assets folder with 44x44 resolution. Change 44x44 resolution image file  Now, code generate the following icon

Add column in WPF DataGrid using both xaml and code

Introduction In this article i will show you how to add columns in DataGrid using xaml code and c# code. I will give you an example of add columns in WPF DataGrid. Datagrid is used to represent a tabular view of data in programming. It have multiple template designs to be customizable by the programmer as per the requirements. It supports some other features like sorting the data, dragging columns and sometimes editing when user needs to do. To add a DataGrid, just drag-n-drop it from the toolbox. Now it is known as a tabular representation, write following code to add some columns (3 here): <DataGrid> <DataGrid.Columns> <DataGridTextColumn Header="First Column"/> <DataGridTextColumn Header="Second Column"/> <DataGridTextColumn Header="Third Column"/> </DataGrid.Columns> </DataGrid> When we run this window then a Datagrid is shown with three columns like in below image:

Example to change windows form shape using c#

Introduction In this article i will show you, how to change the shape of the current form. The default form shape is square and i want to change it in ellipse form. Copy this code and paste into your code file. Code using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication2 {     public partial class Form3 : Form     {         public Form3()         {             InitializeComponent();         }         protected override void OnPaint(PaintEventArgs e)         {             System.Drawing.Drawing2D.GraphicsPath shape1 = new System.Drawing.Drawing2D.GraphicsPath();             shape1.AddEllipse(0, 0,this.Width, this.Height);             this.Region = new System.Drawing.Region(shape1);         }     } } Code generate  the following output

Bind ASP.NET chart control from database table

Introduction In this article i will show, how to bind chart control with database table in asp.net c#. I will give you example of it also provide video for implementation. A graph or chart diagram represents your set of data.If you want to show your company report then you must use chart control. There are different types of chart show different types of data such as Pie Chart Using the pie-chart you can classify your data in graphical format. According to above diagram your movie are divided in different sections such as Action take 18% of whole movie as well as 11% take Horror. Example of How to bind Chart Control using SqlDataSource Step-1: Create Database Table in visual studio. . Step-2: Bind connection with Database using SqlDataSource <%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="

Edit menu bar with cut copy and paste operations in Windows Form C#

Introduction In this article i will show you how to do cut copy and paste operation on text which is entered in the TextBox. I will give you an example of it. It is impossible for one, specially a Programmer, to imagine his/her life without editing. Editing operations (Cut/Copy and paste etc.) are performed using clipboard, so these are also called Clipboard operation. Invention Larry Tesler, who invented Cut/Copy and paste in 1973. He is a computer scientist, working in the field of human-computer interaction. Tesler has worked at Xerox PARC, Apple Computer, Amazon.com and Yahoo! We can find out more about LarryTesler. In this article I will show how to perform these operations with our own code. As we are just doing editing operations, it doesn't matter which control we are using. Here I am using two textboxes to perform this operation. I created a simple window form with a menu strip and two textboxes. In the menu strip all the operations are added in Edit me

Bind CheckBoxList from Database in ASP.Net C# Example

Introduction: In this article we will learn how to bind CheckBoxList in asp.net c#. I will give you an example of CheckBoxlist binding. you can use a CheckBoxList control to display a number of check boxes at once as a column of check boxes. The CheckBoxList control exists within the System.Web.UI.WebControls namespace. This control is often useful when you want to bind the data from a datasource to checkboxes . The CheckBoxList control creates multiselection checkbox groups at runtime by binding these controls to a data source. Public Properties of the CheckBoxList class Cellpadding : Obtains the distance between the border and data of the cell in pixels. CellSpacing : Obtains the distance between cells in pixels. RepeatColumns : Obtains the number of columns to display in the CheckBoxList control. RepeatDirection : Obtain a value that indicate , whether the control displays vertically or horizontally. RepeatLayout : Obtains the layout of the check

Calculate number of records in Gridview when it bind with SqlDataSource

Introduction In this article i will show you how to calculate number of records in database table. This is possible through SqlDataSource class. You can call AffectedRows property  of the SqlDataSource. So lets take a example of count numbers of records in database table. Source Code <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default17.aspx.cs" Inherits="Default17" %> <!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:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource1">             <Columns>                 <asp:BoundFie

Retrieving Data Using a DataReader in ASP.NET C#

Introduction In this article i will show you, how to retrieve data from database table using DataReader. I will give a example of data fetching from database table using SqlDataReader class, also bind the GridView with the DataReader. SqlDataReader  Provides a way of reading a forward-only stream of rows from a SQL Server database ( source from msdn.microsoft.com) Example How to bind gridview using SqlDataReader class Step-1 : Take a Gridview onto design window.   Step-2 :   Develop code for binding gridview using SqlDataReader . using System; using System.Collections.Generic; using System.Configuration; using System.Data.SqlClient; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class datareadercl : System.Web.UI.Page {     SqlDataReader rd;     protected void Page_Load(object sender, EventArgs e)     {         if (!Page.IsPostBack)         {             using (SqlConnection con = new SqlConnection())

September 22 Microsoft Office 2016 launch date fixed

Microsoft proclaimed this morning the official launch date for the long-anticipated remake of Microsoft office. office 2016 are going to be loosely out there beginning on September 22, the corporate says. Meanwhile, office Customers with volume licensing agreements are going to be ready to download the package on October 1. The updated version of office includes variety of latest options for desktop customers, together with the power to co-edit documents at identical time, synchronize files to One Drive within the cloud, and more. Alongside the announcement of the launch date, Microsoft noted a number of different new options and choices for IT admins and businesses wanting to deploy the software package. For starters, the corporate noted that office 365 Pro Plus customers WHO square measure paying for the subscription version of workplace for corporations, also will receive the “Current Branch” – that means the foremost up-to-date feature unleash and security updates – on S

BulletedList Web Server Control Overview, binding with Sql Server in ASP.NET C#

Introduction In this article example i will show you how to bind bulleted list web server control with sql server database. In previous article i explained use of it control using visual studio like how to add value in it at compile time. Lets see the example of bulleted list, which is bind with sql datasource control. Following some steps for binding bulleted list control using SqlDataSource Step-1 : Open visual studio Step-2:  Click  File-->New-->WebSite Step-3: Right click on website name in solution explorer, Add-->Add new item  Step-4: Make Database table  Step-5 : Drag Bulleted list from toolbox and drop on design window. Step-6: Select Show smart tag of Bulleted list Step-7 : On Bulledted list task click choose data source link Step-8: Select New DataSource from Data Source configuration wizard. Step-9: Select SQL Database from Data Source Configuration wizard. and click ok button Step-10 : S