Posts

Copy All files from one folder to other folder in Asp.net

Hi , Here am creating th edirectory at runtime and am coping the All files from one folder to other folder  at a time. <div>     <asp:textbox ID="Textbox1" runat="server"></asp:textbox><br />         <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />         <br />          <asp:Label ID="lblMessage" runat="server"/>     </div> C# code  protected void Button1_Click(object sender, EventArgs e)     {         string directoryPath = Server.MapPath("~/") + Textbox1.Text;         //string[] f = Directory.GetFiles(Server.MapPath("/Account"));       if (!Directory.Exists(directoryPath))       {       ...

Bind data to Dropdownlist inside gridview

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" ShowFooter="true"         DataKeyNames="Slno" OnRowDataBound="GridView1_RowDataBound" Height="202px" Width="347px">         <Columns>             <asp:TemplateField HeaderText="Item Name">                 <ItemTemplate>                     <table width="100%">                         <tr>                             <td width="20%...

GridView Articles In Asp.Net 2.0 3.5 4.0

Hi all, Am gathered some grid view articles from this site. http://csharpdotnetfreak.blogspot.com/2012/07/gridview-articles-in-aspnet-20-35-40.html if u want any reference pls reffer above link. 1. Insert Update Edit Delete Rows Record In GridView How To Insert Update Edit Delete Records With SqlDataSource Using C# VB.NET Asp.Net. 2. Drag Drop GridView Rows With JQuery How To Implement Drag And Drop Functionality Using JQuery JavaScript To Rearrange Rows On Client Side. 3. Display Files In GridView From Server Directory This Example Show How To Display Files Directory Sub Directories In From Server. 4. Nested GridView With Expand Collapse Create Nested GridView With Expand Collapse Functionality. 5. Sort GridView By Columns Header In Ascending Descending Enable Sorting In GridView By Clicking on Columns Or Headers In Ascending Or Descending Direction. 6. Hide Disable CommandField ButtonField How to Conditionally Hide Or Disable CommandField Or ButtonField Progr...

interview questions from net..4

Satellite assemblies are best suited for...........  Application that generate content at runtime or that have large executable components  Which ASP.NET performance counter is the best indicator of inefficient caching?  Turnover rate performance counter  Which is not the element to perform conditional processing with XSL? Correct  How can you detect when application data is about to be removed from the cache? Onremovecallback  XSL transformations convert XML input files to HTML through the XML server control. Correct  The _______________ property determines which satellite assembly is used when loading resources. Correct A web application running on a single server using multiple processors. Choose the best suited option.  Web garden The process of reading database records without locking the records being read.  Dirty Read  How can Garbage Collection be forced in .NET? True In form authentication settings ...

inheritance and structure

What are the 4 pillars of any object oriented programming language? 1. Abstraction 2. Inheritance 3. Encapsulation 4. Polymorphism Do structs support inheritance? No, structs do not support inheritance, but they can implement interfaces. What is the main advantage of using inheritance? Code reuse Is the following code legal? class ChildClass : ParentClassA, ParentClassB { } No, a child class can have only one base class. You cannot specify 2 base classes at the same time. C# supports single class inheritance only. Therefore, you can specify only one base class to inherit from. However, it does allow multiple interface inheritance.   What will be the output of the following code? using System; public class BaseClass { public BaseClass() { Console.WriteLine("I am a base class"); } } public class ChildClass : BaseClass { public ChildClass() { Console.WriteLine("I am a child class"); } static void Main() { ChildClass CC = new Ch...

access modifiers and abstract, sealed class

What are Access Modifiers in C#? In C# there are 5 different types of Access Modifiers. Public The public type or member can be accessed by any other code in the same assembly or another assembly that references it. Private The type or member can only be accessed by code in the same class or struct. Protected The type or member can only be accessed by code in the same class or struct, or in a derived class. Internal The type or member can be accessed by any code in the same assembly, but not from another assembly. Protected Internal The type or member can be accessed by any code in the same assembly, or by any derived class in another assembly. What are Access Modifiers used for? Access Modifiers are used to control the accessibilty of types and members with in the types. Can you use all access modifiers for all types? No, Not all access modifiers can be used by all types or members in all contexts, and in some cases the accessibility of a type member is constr...

polymorphism and fields

What are the 2 broad classifications of fields in C#? 1. Instance fields 2. Static fields What are instance fields in C#? Instance fields are specific to an instance of a type. If you have a class T, with an instance field F, you can create two objects of type T, and modify the value of F in each object without affecting the value in the other object. What is a static field? A static field belongs to the class itself, and is shared among all instances of that class. Changes made from instance A will be visible immediately to instances B and C if they access the field. Will the following code compile? using System; class Area {    public static double PI = 3.14; } class MainClass {    public static void Main()    {       Area A = new Area();       Console.WriteLine(A.PI);    } } No, a compile time error will be generated stating "Static me...