All Things DotNet - Page 30 of 32 - All Things DotNet Discussed - Winforms/ASP.Net/SharePoint/WPFAll Things DotNet
  • Subscribe to this RSS feed
  • Receive updates as soon as they are posted.
August 17 , 2010 | | In: WinForms, WinForms Tips

Adding a Menu to Your Windows Application

With the last few versions of Visual Studio, it’s become very easy to create menus on your form. You just go to the Toolbox, find the Menus and Toolbars section and drag a MenuStrip onto your form. From there, you just type in what you want for your menu items. However, the more items you have, it can get really cluttered and hard to manage really fast. Read the rest of this entry »

August 16 , 2010 | | In: ASP.Net, ASP.Net Tips

2 Cool New Page Properties Added in v4.0

There are 2 new properties which have been added to the Page class in ASP.Net 4.0 :

The first thing you need to do when accessing data, of course is to create a connection to the database.  For this entire tutorial, we’ll use SQL Server for the database, but it can be done with most OleDB databases also.

Naturally, we’ll use/import the necessary namespaces (Sytem.Data and System.Data.SQLClient). In VB, we’ll use the ‘Imports’ statement, and in C#, we’ll use the ‘using’ statement. Read the rest of this entry »

First off, we need to explain what CAML stands for – – Collaborative Application Markup Language. It’s an XML based query language in order to perform a query operation against data in SharePoint. Read the rest of this entry »

August 13 , 2010 | | In: ASP.Net, ASP.Net Tutorials

5 Nifty Things You Can Do With a Path

The ‘Path’ class, in System.IO is very useful and can save you a lot of time and work in getting what you need out of the path. In Classic ASP, using VBScript, with all the mid/left/right functions was a chore. Then, in ASP.Net, these were updated and a little easier, using the substring function. However, that’s not nearly as easy as how you can do it using the ‘Path’ class. Read the rest of this entry »

In order to get a reference to a particular list in Sharepoint, here’s the code to do so (let’s assume your the list name is ‘Customers’):

SPList MyList = SPContext.Current.Web.Lists["Customers"];
August 12 , 2010 | | In: ASP.Net, ASP.Net Tips, Visual Studio

Formatting text in HTML Source View

If the code in your Source View seems unorganized and unreadable, there is a simple way, in Visual Studio, to format the text into a more readable format. What it actually does, is to create a hierarchical, tabbed view of your HTML.

All you need to do is to highlight the text you need reformatted (if it’s the entire file, press Ctrl-A to select all the text), then right-click somewhere in the text, and choose ‘Format Selection’.

That’s all there is to it –voila! – your text is reformatted.

August 12 , 2010 | | In: SharePoint, SharePoint Tips

Iterate Through List Collection

Here’s the code needed (C#) to iterate through the lists collection in a web application, and display them on a page, using a literal control for each one.
Read the rest of this entry »

To create an MDI (Multiple Document Interface) application in your Winforms Project, start with creating a new WinForms project. This creates one main form for the application. Go to the Properties window for this form and set the ‘IsMDIContainer’ to TRUE. This sets up the form as an MDI container for child windows.

Being that an MDI form is a container, it is a container for child forms/windows. Child forms/windows are forms that show up only inside the MDI container. To open a child form, you need to add code like the following: Read the rest of this entry »

August 12 , 2010 | | In: WinForms, WinForms Tips

Appending Text to a TextBox

In the old days, appending text to a textbox meant concatenation  – something like:

TextBox1.Text=TextBox1.Text + myNewText

or:

TextBox1.Text+=MyNewText

Instead of this, we now have:

TextBox1.Text.AppendText(MyNewText)

This is for a use in which the StringBuilder class would be overkill. Plus, this has much less overhead than the older concatenation method also. It’s faster and more efficient. That’s all I needed to hear.


 



All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF


If you find this site helpful,
please donate to help keep it online and free





Code 'n' Sprox   DreamTemplate - Web Templates

Follow us on Twitter

Follow AllThingsDotNet on Twitter


Test - The Name: 6936