blackf0rk


Member since 03/12/2009

Name: Jourdan Laik

Location: Wisconsin

Website: http://www.enspiar.com

32 snippets

15675 profile views

1 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

blackf0rk's Recent Snippets



« Prev 1 2
This code will take a start and end string and then search for them within the subject string. It returns what is between the start and end strings. As an example, if I had the following text... Some test text string, with a start <tag> and an end...
0 1867 posted 16 years ago by blackf0rk
This code will execute a postback.
0 1232 posted 16 years ago by blackf0rk
1 1821 posted 16 years ago by blackf0rk
An important thing to keep in mind about adding groups is that you add groups to site collections and not webs. To do this, we access the SiteGroups collection rather than the Groups collection. In order to assign permissions, each group you add n...
0 1913 posted 16 years ago by blackf0rk
This will delete all items in a SharePoint list. Better than looping through a SPListItemCollection and doing a .delete();
0 1993 posted 16 years ago by blackf0rk
In order for the code snippet(s) to work, you need to do the following: 1. Go download the EWS API SDK: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1 2. Install the SDK on your machin...
0 1758 posted 16 years ago by blackf0rk
In order to accurately get the next ID from a SharePoint list you need to access the content database for one reason: If you delete all the items from a list, and execute this simple code: list.Items[list.ItemCount -1].ID) + 1 the ID will always retu...
0 1587 posted 16 years ago by blackf0rk
2 1772 posted 16 years ago by blackf0rk
Use inType=0 and feed in a specific Google Maps URL to parse out the GeoCoords from the URL e.g. http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=53154&sll=37.0625,-95.677068&sspn=52.505328,80.507812&ie=UTF8&ll=42.858224,-88.000832&spn=0....
4 4179 posted 17 years ago by blackf0rk
This is a simple function to test for an internet connection. Originally grabbed from "devbuzz" at the devbuzz forums (see link) and now modified for VB.NET 3.5
0 2109 posted 17 years ago by blackf0rk
This will return a list of all the tables in a certain database along with their row count.
1 1769 posted 17 years ago by blackf0rk
Execute this commend to add users to SharePoint
0 1614 posted 17 years ago by blackf0rk
This command will fix the “The list is too large to save as a template. The size of a template cannot exceed 10485760 bytes." error when saving a list (including content) that's too big.
0 1541 posted 17 years ago by blackf0rk
If you want to have a JavaScript confirmation alert to popup before executing the codebehind (e.g. asking the user if they really want to delete a record):
1 1565 posted 17 years ago by blackf0rk
If you need to get the DataKey value in RowDataBound (e.g. Assigning the DataKey to the CommandArgument of a button):
0 1562 posted 17 years ago by blackf0rk
Convert hexidecimal color codes (ie #C0C0C0) to decimal RGB (ie 255,255,255)
0 1953 posted 17 years ago by blackf0rk
If you have a component being bound from an ObjectDataSource (like a drop-down menu, or a grid view) and you wish to change the value's SelectParameters. Where # is which SelectParameter you'd like to change. If there's just one SelectParamter, defau...
0 1575 posted 17 years ago by blackf0rk
Dynamically change the content of meta tags from the code behind. This allows you to feed the meta tags with content from a database or other dynamic content.
0 1722 posted 17 years ago by blackf0rk
2 6456 posted 17 years ago by blackf0rk
Sometimes you want to return a bunch of data from a table, but you want it coming back in a random order. Maybe it's for keeping some content on a home page fresh. Here's how:
0 1492 posted 17 years ago by blackf0rk
If you're going to be using a common function throughout the Web site, you can include the function in your MasterPage and gain access to it from each aspx that inherits from this MasterPage; like so:
0 2145 posted 17 years ago by blackf0rk
Validating a decimal such as a measurement of time or currency (10.5 or 0.4). This function will return the correct number. If you feed in "10.5foo" the function will spit back 10.5. If you feed in "bar" the function will return nothing.
0 1528 posted 17 years ago by blackf0rk
Assuming your DataSet (named, ds) is already populated with Data and contains only one table.
0 2372 posted 17 years ago by blackf0rk
It's important that the newPn var that you pass into the Convert.ToInt64 function is in the xxxxxxxxxx format and that no characters are present.
1 2601 posted 17 years ago by blackf0rk
Passing in a seed and your string will return an encrypted string. Pass in the same seed and the encrypted string again and it will return the original unencrypted string.
1 2055 posted 17 years ago by blackf0rk
« Prev 1 2