"What if? Why not? Challenge the Convention! Let's do some incredible things!"  More Quotes

Welcome to Aspire Knowledge Central (AKC)

   Home   Public Library   Author Content

Choose a data format:   classic-xml   object-xml   embedded-xml   text   excel

CS-dotnet

0) Interview questions for c# (13-May-09)

You can use the following url to brush up on your c# skills

See the list of c# questions

1) How to stream an Object as XML (14-Jun-07)

How to stream an object as XML to a string
Controlling root and root field name
Controlling array elements
More sample code
XmlArrayItem

2) gridview onrowcommand (9-Jun-07)

How to fire actions from a gridview
gridview onrowcommand
datakeys
buttonfield
buttonfieldtype
commandname

3) GridView samples (6-Jun-07)

GridView samples

4) aspire.net samples (6-Jun-07)

aspire.net samples

5) Naming controls in aspx pages (6-Jun-07)

Naming controls in aspx pages

6) Things you shouldn't be asking in asp.net (6-Jun-07)

Things you shouldn't be asking in asp.net

7) Feature changes in Asp.net 2.0 (29-May-07)

Feature changes in Asp.net 2.0

8) How come runat is needed at high level tags? (29-May-07)

How come runat is needed at high level tags?

9) gridview selectedindex (28-May-07)

gridview selectedindex

10) Sample sql syntax (24-May-07)

Sample sql syntax

11) An exercise using masterpages: Draft (23-May-07)

Masterpages are keys in constructing websites in asp.net. They provide the background for a website such as the top banners, left hand navigation, footer etc. In this exercise you will need to

  1. Create a basic empty website
  2. create a main master page (banner, left hand menu, footer)
  3. create a web page that will use that master page
  4. Create a child/nested master page (provide a page menu on the right)
  5. create a web page that uses the nested master

12) creating a table in oracle (23-May-07)

creating a table in oracle

13) asp.net validation basics (23-May-07)

asp.net validation basics

14) asp.net masterpages basics (22-May-07)

asp.net masterpages

15) asp.net column gridview widths (18-May-07)

asp.net column gridview widths

16) asp.net populating, working with datatable objects (18-May-07)

asp.net populating, working with datatable objects

17) How does data binding work in a templated item (18-May-07)

How does data binding work in a templated item

18) asp.net gridview empty datasource display header footer (18-May-07)

asp.net dataview empty datasource display header footer

19) asp.net: how to submit a web fom (17-May-07)

asp.net: how to submit a web fom

20) asp.net: Viewstate and dynamically added controls (17-May-07)

asp.net: Viewstate and dynamically added controls

21) How to retrieve form elements dynamically in asp.net: findcontrol INamingContainer (17-May-07)

How can I retrieve the form elements on serverside in dotnet

22) asp.net what happens to the view state of data variables on the page? (16-May-07)

asp.net what happens to the view state of data variables on the page?

23) Annotated asp.net 101 for the smarts (16-May-07)

Introduction

For an experienced html web programmer it shoudl be really quick to start writing code in any framework as the concepts are similar. This article will give you a quick start to start developing web pages while highlighting the important elements with out fluff. This information is distilled from a number of web sources and also books.

Prerequisites

it is assumed that you are familiar with the general idea of asp.net where html controls are represented as server side control objects. The web page with an extension of .aspx will contain the placement and configuration of these control. The codebehind file contains the manipulating logic for these controls.

This exercise

The goal of this exercise is to display the output of a select statement in a data grid. Make one of the columns hyperlinked so that one can see the details in a separate web page. The deliverables are two aspx pages with their respective code behind files.

24) what's up with asp.net isValid function (16-May-07)

what's up with asp.net isValid function

25) data binding samples (15-May-07)

data binding samples

26) How do I check type in c# (8-May-07)


class a{};
object o;
if (o is a)
{
do something;
}

27) is it possible to add an edit field to a datacontrolfield (8-May-07)

is it possible to add an edit field to a datacontrolfield

28) How can I look up a class ref quickly in dotnet (8-May-07)

How can I look up a class ref quickly in dotnet

29) howcome classes in .net app_code folder does not have namespace (5-May-07)

dotnet app_code folder

30) How to call base class and this constructors in c#? (1-May-07)

class a
{
    a():base(){}
    a(string b):this(){}
    a(int a): this("hello") {}
}

31) Working with c# strings? (1-May-07)

c# strings
Equivalence
Splitting

32) adding template columns (27-Apr-07)

adding template columns

33) oracle 10g (21-Apr-07)

oracle 10g

34) where does console output go for asp.net web applications (21-Apr-07)

where does console output go for asp.net web applications

35) How can I add an existing project to a website solution (21-Apr-07)

How can I add an existing project to a website solution

36) How can I use hyperlinkfield in dataview (21-Apr-07)

How can I use hyperlinkfield in dataview

37) what is the Data Binding Syntax in ASP.NET 2.0 (21-Apr-07)

what is the Data Binding Syntax in ASP.NET 2.0

38) How come I dont see web.config in visual studio 2005 (20-Apr-07)

How come I dont see web.config in visual studio 2005

39) How best to create a solution for web site projects (18-Apr-07)

How best to create a solution for web site projects

40) what are the default methods on a page object (18-Apr-07)

what are the default methods on a page object

41) Anatomy of an asp.net web page (18-Apr-07)

Anatomy of an asp.net web page

42) Important bloggers in asp.net space (18-Apr-07)

Randy Connolly
Scott Allen
Dino Esposito
Scott Guthrie
Jimmy Nilsson
Ted Pattison
Fritz Onion
Scott Mitchell
Rick Strahl

Important for googling

43) how to work with dotnet table control? (18-Apr-07)

how to work with dotnet table control?

44) Web Forms Page Syntax (18-Apr-07)

http://authors.aspalliance.com/aspxtreme/aspnet/syntax/aspnetpagesyntax.aspx

Reference information for asp.net web pages

45) basic class structure in c# (13-Apr-07)

basic class structure in c#

46) How does method inheritance work in c#: virtual override (13-Apr-07)

This article will address the following

Overloading
virtual and overriding
hiding
return types

The plot seems thicker than what the subject seem to indicate

47) what does databind do for a datagrid? (11-Apr-07)

A simple aspx page with a datagrid


<h2>A sample data grid</h2>

<asp:GridView ID="testGrid" runat="server">
</asp:GridView>

Sample code for binding to this dataset


public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //this.testTable
        this.testGrid.DataSource = getSampleDataset();
        this.testGrid.DataBind();
    }
    private DataSet getSampleDataset()
    {
        DataSet ds = new DataSet();
        string xmlData = "<XmlDS>";
        xmlData+= "<table1><col1>Value1</col1><col2>value</col2></table1>";
        xmlData += "<table1><col1>Value2</col1><col2>value</col2></table1>";
        xmlData += "<table1><col1>Value2</col1><col2>value</col2></table1>";
        xmlData += "<table1><col1>Value2</col1><col2>value</col2></table1>";
        xmlData += "<table1><col1>Value2</col1><col2>value</col2></table1>";
        xmlData+= "</XmlDS>";
        System.IO.StringReader xmlsr = new System.IO.StringReader(xmlData);
        ds.ReadXml(xmlsr, XmlReadMode.InferSchema);
        return ds;
    }
}//eof-class

48) How to quickly load a dataset from xml (10-Apr-07)


DataSet dataSet = new DataSet();
DataTable dataTable = new DataTable("table1");
dataTable.Columns.Add("col1", typeof(string));
dataSet.Tables.Add(dataTable);

string xmlData = "<XmlDS><table1><col1>Value1</col1></table1>";
xmlData += "<table1><col1>Value2</col1></table1></XmlDS>";

System.IO.StringReader xmlSR = new System.IO.StringReader(xmlData);

dataSet.ReadXml(xmlSR, XmlReadMode.IgnoreSchema);

49) what is XDR? (10-Apr-07)

what is XDR?

50) Getting Data from Oracle in asp.net (7-Apr-07)

Getting Data from Oracle in asp.net

51) LINQ Notes (14-Nov-05)

Linq

52) Windows Secuirty Book by Keith (9-Aug-04)

http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage

53) An easy way to fill a combo box or a list box from an enum. (2-Jul-04)

Credits: Paul Montgomery

To set a combo box ( or list box ) to all of the values in an enum, do the following.


this.ComboBox1.DataSource 
   = Enum.GetNames( typeof ( YourEnum ));

Then to get it back out.


YourEnum val 
   = (YourEnum) Enum.Parse(typeof(YourEnum)
          ,comboBox1.SelectedItem.ToString());

54) My notes on file upload size limits in Dotnet (2-Jul-04)


HttpPostedFile postedFile		= Request.Files["fieldname"];
if (posterFile != null)
    fileUpload.SaveAs(filePath);

Read the full story for limitations and work arounds for file sizes greater than 4M.

55) Internet Explorer Web Control looses session cookies in response to a new window (24-Jun-04)

When an internet explorer control is embedded in a power builder window, the internet explorer seem to loose session cookies for popups. Obviously this is not desirable for a reason. This drawback prevents from embedding fully functional web applications inside of a client server systems such as those built powerbuilder, delphi, or home grown.

While searching for the related material in google it might interest the reader to note the following key words in their order of narrowness/importance descending.

NewWindow2 powerbuilder
NewWindow2
184876
311282
IWebBrowser2
ie new window session cookies

56) Incorporating the WebBrowser Control into Your Program (24-Jun-04)

http://www.microsoft.com/mind/0798/webbrowser.asp

A formal article. Quite old though. 1998.

57) Programming and reusing ie from msdn (24-Jun-04)

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/prog_browser_node_entry.asp

Various topics on controlling ie
WebBrowser control

58) File upload configuration entries from ABUpload.net (10-Jun-04)

http://www.websupergoo.com/helpupload50/source/2-tech_notes/3-web.config.htm

httpRuntime
maxRequestLength
executionTimeout
sessionstateTimeout
responseDeadLockInterval

59) Configuring file size limits in dotnet: httpruntime reference from msdn (10-Jun-04)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfhttpruntimesection.asp

60) Introductory asp.net (27-May-04)

http://www.asp101.com/lessons/

Basic composition/structure of an aspx page

61) Architecture of ASP.NET controls (27-May-04)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcondevelopingwebformscontrols.asp

From the source:msdn
Guts of controls

62) A C# property (12-Apr-04)

A C# property


public class SimpleProperty 
{
   private int number = 0;
   public int MyNumber 
   {
   get {  return number; }
   set {  number = value;}
   } 
}
public class UsesSimpleProperty
{
   public static void Main()
   {
      SimpleProperty example = new SimpleProperty();
      example.MyNumber = 5;
      int anumber = example.MyNumber;
   }
}

63) A web page and a .net control (12-Apr-04)

Idea of a web page control in .net

64) How to upper case a selected text in VisualStudio.net (16-Oct-03)

To upper case it: ctrl-shift-u
To lower case it: crl-u

65) A three step process to creatign schema documents (XSDs) (14-Oct-03)

. Create a dummy xml
. use xsd.exe to create the .xsd file
. use Visual studio to tweak the XSD for a) cardinality and b) data types

Caveat: There may alternate ways to generate the complex types in the XSD than the default approach that XSD takes. Nevertheless it should work.

66) Working with date/time in c# (3-Sep-03)

1. Convert date/times to strings
2. A listing of datetime formats

67) 15 Seconds : A Primer on Using DB2 with .NET by Chip Irek, 6/23/2003 (21-Aug-03)

http://www.internet.com/icom_cgi/print/print.cgi?url=http://www.15seconds.com/issue/030623.htm

Working with DB2, from a .NET application developer's perspective, is just like working with any other relational database. One can find endless examples of how to perform databases tasks (from the mundane to the interesting) for Microsoft SQL Server and Oracle, but there is not as much similar documentation for accessing DB2 from Microsoft technologies, including .NET.

68) 15Seconds.com (21-Aug-03)

http://www.15seconds.com/

1. .net resources
2. data access technologies
3. articles

69) Do you care about null values by Richard Lhotka (4-Aug-03)

Some ideas on how to deal with database nulls in the .net world

70) Paging through records in ASP (22-Jul-03)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnserv/html/server05222000.asp

71) Working with attributes and reflection (15-Jul-03)

http://www.ondotnet.com/lpt/a/1040

72) How to tokenize strings in c# (24-Jun-03)

char[] sepString = new char[]{'1'};
string[] userIdList = customerIdList.Split(sepString);

73) Develop mentors list archives (20-Jun-03)

http://discuss.develop.com/

74) A few hints and tips on c# from Jon (20-Jun-03)

http://www.yoda.arachsys.com/

This has nice section on static initializers and static constructors

75) How do you work with arrays in c#? (11-Jun-03)

array examples: Instantiating, type checking, string splitting

76) How do you convert a string to an int? (11-Jun-03)

m_timer.Interval = Convert.ToInt32(m_interval) * 1000;

77) How can I walk through a dataset? (11-Jun-03)

sample code for walking through a data set

78) How to deal with exceptions in .net? (11-Jun-03)

Some notes on .net exceptions

79) How do you inherit from an Exception? (11-Jun-03)

Explains derivation in c#, calling base class etc.