All Things DotNet - Page 31 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 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.

Two of the most common scopes used for features are ‘Site’ and ‘Web’. When using the ‘Web’ scope, the feature can be used anywhere in the Web application. If, instead you are using the ‘Site’ scope, the feature is only available in the particular Site Collection in which it’s installed. Read the rest of this entry »

August 11 , 2010 | | In: Sharepoint 2010, SharePoint 2010 Tips

Where is the 12 Hive in 2010?

There is a movement now, to, instead of calling it the 12 Hive, which is based on a specific folder ’12’ (or in the case of SharePoint 2010 – ’14’), it’s becoming generally accepted that we should now call it the ‘SharePoint Root folder’. Read the rest of this entry »

August 11 , 2010 | | In: Visual Studio

Bookmarks in Visual Studio

Did you know you can add bookmarks in your Visual Studio code?

These can be very helpful to find particular sections that you will be working on from time to time. This is even more helpful when your code file is very large. Read the rest of this entry »

August 11 , 2010 | | In: Basic Web Miscellaneous

What is a URI?

Basically, URI stands for “Uniform Resource Identifier“.

It’s basically a set of characters which identifies the address of some resource on the web or network. It can be a URL, but it isn’t necessarily so.

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

Adding a Tooltip to a Label

It’s not directly intuitive how to do this, since, when you add a label to a form, there is no ‘Tooltip’ property for it.

All you need to do is to drop a ToolTip control from the ToolBox, on your form. It will appear in the tray below the form, and not ON the form itself

Just add a title for it, in the properties of the ToolTip, and then click on the label itself. Now, you will see a ToolTip property in the Properties window. It will say something like ‘ToolTip on ToolTip1′ (Here, ToolTip1 is the Name of the ToolTip in the tray. If you named yours, your specific name should appear here instead)

In this property, just enter the text you want to appear in the ToolTip for the label and you’re done.

Many times, you need to have a label and you want it centered on the form at all times, even after sizing of the form, and you want it to stay at the bottom. Something you might use this for could be a copyright statement. DotNet provides very good support for this. Read the rest of this entry »

REST (the initials) stand for : Representational State Transfer.

REST is a service API which allows you to access services and data from various clients. To do this, you would specify a URL to some item, like a web page with xml in it, and get that item back, via an HTP ‘GET’ request, and parse and reformat the xml.

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

‘EndsWith’ is Case-Sensitive

The string function ‘EndsWith’ is case-sensitive, even in VB.Net, so if you’re looking for a certain string (maybe the file extension, in a filename), you need to make sure you’re looking for the correct thing, since ‘xls’, with case-sensitivity, is different than ‘XLS’.

So, if you’re function is looking for ‘xls’, you must make sure that you make adjustments to the filename string, in order to catch things like this. To do this, you would need to change:

if myFilename.EndsWith("xls")

to

if myFilename.ToLower.EndsWith("xls")

If you already have any kind of button, whether it be a plain button, LinkButton, or Imagebutton, in a TemplateField, within a GridView, you can add ‘Select’ features to it, just as if you had added a ‘Select’ column.

All you need to do is add ‘Select’ to the CommandName property. Then, anything you could do with the Select CommandField, you can do with your own TemplateField.


 



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