|
| |
| |
| |
|
Statistics |
| Unique Visitors: 3 |
| Total Unique Visitors: 212154 |
| Visitors Out: 1207 |
| Total Visitors Out: 2451 |
|
|
|
| |
|
|
| |
|
|
| How to restrict check box in grid-view , get selected data in asp.net |
| 2012-05-10 07:33:00 |
How to restrict check box in grid-view , get selected data in asp.net
<div dir="ltr" style="text-align: left;" trbidi="on">
If you don have database the First Create a class which contains three property like id,name,address as show below
using System;
/// <summary>
/// Summary description for ClassData
/// </summary>
public class ClassData
{
public int id { get; set; }
public string name { get; set; }
public string Address { get; set; }
}
Create a Gridview in aspx file as give below
<gridview autogeneratecolumns="false" id="grdView" onrowdatabound="grdView_RowDataBound" runat="server"></gridview>
<columns>
<templatefield headertext="select"></templatefield>
<itemtemplate>
<checkbox id="chkBox" onclick="chkCount(this)" runat="server"></checkbox>
</itemtemplate>
<templatefield headertext="ID"></templatefield>
<itemtemplate>
<label id="ID" runat="server" text="<%#DataBind...
|
| |
|
| How to send email with Notification using ASP.NET |
| 2012-05-07 23:35:00 |
There are a namespace in visual studo which is resposible to send mail, to any i am posting a way to send the email
To send email to any using C# please add this namespace to file.
using System.Net.Mail;
Create a class of SMTPClient and mail massage as given below and fallow this way.
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{ MailAddress fromAddress = new MailAddress("MailAddress", "Your Name");
MailAddress objMail = new MailAddress("MailAddress");
// Write down ip address of SMTP SERVER
// Default in IIS will be localhost
smtpClient.Host = "SMTP server";
//Port is specify or Default port : 25
smtpClient.Port = 25;
//From address spacify those who are sending mail
message.From = fromAddress;
// To address to add recipent email
message.To.Add("MailAddress");
message.Subject = "Test";
//For HTML type please do true
message.IsBodyHtml = false;
// if you wana notification with header then Please write down this line el...
|
| |
|
| How to Trim or Remove First And Last Char from String |
| 2012-05-07 01:52:00 |
To remove Last 2 Charector from string
String Key ="Anandkumar";
key.Substring(0,key.Length - 2);
OutPut: Anandkum
To remove First Char from string
String Key ="Anandkumar";
key.Remove(0,2);
OutPut:andkumar
...
|
| |
|
| How to write Sql In Operator in Linq |
| 2012-05-01 00:22:00 |
As we always go through in operator to pass some parameter to in like
select id,name,address from tbl_address where name in ('anand','kumar') . To implements this query in linq we need to create a list with the type of sql column datatype. If Name is Varchar then go with List ,if id int the go with list
its very similar to sql statements but in WHERE class of linq we need to pass listObj.Contains()
Please try the same like
DbClassDataContext objDB = new DbClassDataContext();
protected void Page_Load(object sender, EventArgs e)
{
List listobj = new List();
listobj.Add("Anand");
listobj.Add("Kumar");
listobj.Add("Siv");
var litsData = from i in objDB.GetTable()
where listobj.Contains(i.Name) // note this point
select new { i.Name,i.Address};
foreach (var i in litsData)
{
Response.Write(i.Name.ToString()+", "+i.Address.ToString() + "
");
}
}
in the above example I am using Name that is type of varchar so I create List objList . For searching data I use where l...
|
| |
|
| New feature in Dot net framework 2010, CLR 4.0 |
| 2012-04-30 23:12:00 |
There are so many new feature introduced in vs2010 as given below
1 - Security
2 - Parallel computing
3 – Performances and Diagnostics
4 - ETW Events
5 – Code Contracts
6 – Lazy initialization
7 – DLR (Dynamic language Run Time)
8 – In-process side by side execution
9 – Interoperability
10 – Profiling
11 – Tuples
12 - Sorted generic Class
13- Big-integer
14 – Corrupted state exception
for more details Please visit : http://msdn.microsoft.com/en-us/library/t357fb32.aspx
: http://www.codekicks.com/2009/06/27-new-features-of-net-framework-40.html
...
|
| |
|
| S.O.L.I.D Architecture for Quality of C# Code. |
| 2012-04-22 06:38:00 |
As we always face some situation when there are required to mend a lot of code either of extension of method, or extension of functionality , its always goes on wrong path when u just tried to enhance or extend the existing class, interface and function. To reduce this type of problem Microsoft introduced SOLID principle,
its Stands for
S : Single Responsibility principle O : Open Close PrincipleL : Liskov Substitution Principle I : Interface Segregation principle D : Dependency Inversion Principle
This are the list of principle which comes under solid Architecture.
We will discuss in details further.
...
|
| |
|
| What is Difference between array and array list. |
| 2012-03-28 10:30:00 |
What is Difference between array and array list.
There are a lot of difference between array and array list.1 Size:1) Arrays are fixed in size. (it can be externally extendible with Array. Resize () actually it doesn’t resize it’s create an new array and copy old data to new one with extended memory)1) While Array List dynamically adjust its memory.2 Type2)Array are strongly type means all data type should be as defined if Int[] array data will be int , if String[] array data will be string and so on2) array list can have string or int or any as per our need. 3 Namespace 3) array Comes under System.Array namespace 3) array list comes under System.Collections.Generic 4 Decla...
|
| |
|
| What is Manage code and unmanaged code? |
| 2012-03-17 06:57:00 |
What is Manage code and unmanaged code?
Manage Code:
Definition: Manage code is created under control of CLR and .net framework. But it has some constraints 1- Compiler Must produce MSIL file that is targeted to CLR 2- Use .net framework library.
Benefits:
1- Modern memory Management2- Ability To mix languages 3- Better security 4- Support of version control5- And a good way to interact with components
Unmanaged Code:
It’s Just opposite to manage code. Code doesn’t Create under control of .net framework. Prior to some .net framework use unmanaged code. Manage code and unmanaged code can work together.
...
|
| |
|
| What is Microsoft .net framework, CLR and .net Library? |
| 2012-03-17 06:26:00 |
What is Microsoft .net framework?
Microsoft .net framework is define as environments to support Development and execution of highly distributed application, component based application. Its enables different computer application to work together with and provide security, portability and common application model for windows platform. As we know framework define two entities two major entity1- CLR2- . Net Library
What is CLR?
As Full name describe its Common Language runtime which takes care of programme execution, Garbage Collections. Now the question is when and how its works , When a programme compile, it doesn’t convert code into executable code. Its convert into pseudo code That is portable and independent of CPU. This code is known as MSIL(Microsoft intermediate code) it’s also define as portable assembly. It’s very similar to java byte code not like that.It is the job of CLR to convert the MSIL ...
|
| |
|
| |
 |