Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
N

nikneem2005

@nikneem2005
About
Posts
30
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • saving image in sql database
    N nikneem2005

    I would not recommend storing images in your database because of performance issues. Store the URL of the image instead and store the image itself just as a file somewhere on your webserver.


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET database csharp asp-net tutorial

  • Converting an URL to a link
    N nikneem2005

    Hey guys, I'm trying to create html links of all URL's in a string. I'm calling the function below which seems to be pretty close to my needs, except for when someone enters a link followed by text directly after the url. Somebody with a 'proven technology' solution? public static string LinkText(string Input) { Regex urlregex = new Regex(@"(http:\/\/([\w.]+\/?)\S*)", RegexOptions.IgnoreCase | RegexOptions.Compiled); string Output = urlregex.Replace(Input, "[$1](\"$1\")"); Regex emailregex = new Regex(@"([a-zA-Z_0-9.-]+\@[a-zA-Z_0-9.-]+\.\w+)", RegexOptions.IgnoreCase | RegexOptions.Compiled); Output = emailregex.Replace(Output, "[$1](mailto:$1)"); return Output; }


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET html regex question

  • Refreshing Parent Page
    N nikneem2005

    erhm... I think the best way is to open the pop window with the existing querystring of your parent page window.open('popup.aspx?querystring=1','window','windowproperties'); in popup.aspx you modify the querystring to a new querystring you want to refresh the parentpage with. Lets assume you want to change the value 1 into two... Your stringbuilder looks like this than Dim sScript As New System.Text.StringBuilder sScript.Append("") sScript.Append(Environment.NewLine) sScript.Append("parent.window.opener.location = 'page.aspx?querystring=") sScript.Append("2") ' or any value you want sScript.Append("';") sScript.Append(Environment.NewLine) sScript.Append("window.self.close();") sScript.Append(Environment.NewLine) sScript.Append("") RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString) Note I also changed your newline characters into en environment.newline, this is just more neat... You also add the newline characters by appending the character using an ampersant ( "a"&"a" ) if you do so, your stringbuilder doesn't make sense... I changed the way the javascript is built in just a neater way... the result will be fearly the same except for the querystring part ;)


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET database business sales help question

  • truncate strings
    N nikneem2005

    In fact your solution gives my an idea which will furfill my needs... I can count till the desired number of characters, let's say 140 and then truncate the string as soon as the next space occures, or if character 140 is in the middle of a html tag, as soon as the tag ends.... Thanks for bringing up the lighbulb above my head :doh:


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET html database help tutorial question

  • help with search code
    N nikneem2005

    You want to use a 'like' query on your database which allows you to search through string which 'looks like' your string... the syntax is easy select field1, field2 from table where field1 like '%demo%' this returns all rows where field1 contains the string 'demo'. However, you may consider using and/or functionality in your websearch, for example when a visitor enters demo+csharp in the textbox. Your query should look like this select field1, field2 from table where field1 like '%demo%' and field1 like '%csharp%' If the user enters 'demo csharp' as search text, you want select field1, field2 from table where field1 like '%demo%' or field1 like '%csharp%' This makes searching complicated. Afterwards you want to sort the result set having the most relevant match on top. For example you can count the number of matches for each result in the result set and order the result set depending on that number of matches having the most matches on top. You can make search functionality as easy or as complicated as you want... ;)


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET csharp question asp-net algorithms help

  • Missing partial modifier on declaration of type 'DataSet1'
    N nikneem2005

    Partial classes allow you do devide classes into multiple files... for example file1.cs contains namespace one.two.three { partial class four() // note the partial modifier { public const string a = "a"; } } and file2.cs contains namespace one.two.three { partial class four() // note the partial modifier { public const string b = "b"; } } The compiler would think the same of those two files, as if it was a single code file containing namespace one.two.three { class four() // partial modifier is missing in this line { public const string a = "a"; public const string b = "b"; } } (not the partial modifier is missing in the class declaration) Now when you use this feature (which is very usefull and handy by the way) you MUST use the 'partial' modifier in each code file containing the same class... In other words, if either the class declaration in my example above (code file file1.cs and file2.cs) misses the partial modifier, your compiler doesn't understand what you want and gives that message.


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET help csharp visual-studio

  • Controling Child Window
    N nikneem2005

    Erhm, I think I don't understand your question... Do you mean you want to scroll down that window to the bottom while it loads, and then scroll up when loading is done?


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET com question

  • truncate strings
    N nikneem2005

    Hey guys, My website contains a messagebox where visitors can (obviously) post messages. The right side of my website contains an area where the latest three messages are shown. Now I want to truncate these messages to a maximum of 150 characters (if the're shorter, leave them alone). This is easy, not a problem, however, the string can contain image tags (smiley's) now when truncating the string, I want to leave those image tags alone and not truncate in the middle of a tag. I want to remove all html tags (which in fact can only be image tags) then truncate the text to 150 chars as needed and restore the image tags at the original position if needed. Anyone a good approach or idea? I change the image tokens which mean a smiley into image tokens before I store them in the database, this prevents me from checking for image tokens each time I read the message from the database. If I don't convert the tokens into image tags before storing, the problem still exists because a token may be multiple characters (for example a semicolon and a ) sign for a wink smiley) and I don't want to truncate the string in the middle of a token leaving me with a semicolon only.


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET html database help tutorial question

  • Stopping a Thread
    N nikneem2005

    Try looping through the threads from count-1 to 0... Note that aborting a thread throws an exception which you need to catch. for(int i=alThreads.length-1;i >= 0; i--) { Thread thread = (Thread)alThreads[i]; if(thread.IsAlive) thread.Abort(); Thread.Sleep(5000); }


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    C# help

  • lauch pdf file
    N nikneem2005

    What do you mean with 'launch' the pdf file?? Do you want to open it?? And do you want to open it server side, or client side?? I reckon you store the byte[] in a file and link to that file using a hyperlink...


    I love it when a plan comes together http://www.zonderpunt.nl[^]

    ASP.NET help

  • Backward reading of a file in C#
    N nikneem2005

    xPath is supported by the .NET framework in the namespace System.XML.XPath. You can find loads of manuals, how-to's and articles around the web.


    I love it when a plan comes together

    C# csharp xml performance

  • Running a thread on one form from another form
    N nikneem2005

    I think there are several ways to 'understand' you problem. I think you have two form in which you want to run a diffrent procedure : frmA.ProcedureA() and frmB.ProcedureB() If this is true, you can probably run ProcedureA() and ProcedureB() in seperate threads. If frmB is a child of frmA, then make sure not to open frmB as a dialog window, or make them a MDI child of frmMain or so... But once again, I don't exacly know what your problem is, can you explain a bit more to find a more accurate solution...


    I love it when a plan comes together

    Visual Basic help csharp

  • HelpNameSpace linked to host machine
    N nikneem2005

    Can't you use the Application's StartupPath property and set the path to the CHM file at runtime? System.Windows.Forms.Application.StartupPath


    I love it when a plan comes together

    Visual Basic help question

  • Adding reference at runtime
    N nikneem2005

    I'm creating a component in VB.NET which acts as kind of a wrapper for Ms Outlook 2003 and Ms Word 2003. There are three components which can be used seperately. Now when I want to use the Outlook component, I don't want to load the Word assemblies and vice versa, but I dot want the controls within a single assembly. Is it possibly to create the references to the required Office Interop Assemblies at runtime (in the constructors for example) so when loading my assembly, not needed office resources will be left alone? For example, when using the Outlook control, my assembly loads Office.Core.dll and Office.Outlook.dll and NOT Office.Word.dll


    I love it when a plan comes together

    Visual Basic csharp asp-net com tutorial

  • Determine DLL/EXE Version number
    N nikneem2005

    Hello there, I'm having problems reading a DLL Version number. I used the System.Reflection in order to load the assembly, and then read the version number. No problem, it works fine! But since we cannot unload, the dll is locked untile my app shuts down. My app is a WebService, so won't shut down every second ;-) Is there another way to get the version number of a dll/exe, or to unload an assembly so that it's overwritable again? Thnx


    I love it when a plan comes together

    Visual Basic help question announcement

  • No overload for method
    N nikneem2005

    Yup, I guess that should be it... Throwing an ArgumentException in case of an SqlException solves the problem.


    I love it when a plan comes together

    C# csharp database tutorial question

  • No overload for method
    N nikneem2005

    Hey guys, I'm so sorry because this is probably one of the most stupid questions I ever asked, but hey, I once was a VB programmer and now started C#, you should be happy hearing that ;) Now what's happening, I'm creating a databound control in C# which uses an Sql connection in order to fetch it's data. To establish the connection we need a connection string, and so I check for the existance of if. When the connectionstring property was not set, I want to throw an exception telling the user that the connectionstring was not set. throw new SqlException("Connectionstring not set"); Now when compiling I get the warning No overload for method 'SqlException' takes '1' arguments I cannot find what's really meant here, and how to solve it... Any ideas? I love it when a plan comes together

    C# csharp database tutorial question

  • Planning overview.NET
    N nikneem2005

    Hello there, I'm currently creating an windows app, which should also contain a planning part. Users should be able to create 'projects' and 'actions' within those projects, and plan them within a certain time span. Now I want to display those projects (and actions) in one view. Now I need a control which is able to display that info. I think someething like a timeline at the top and bottom of my windows form, and inbetween the actions of the project, and bars representing the time. A MS Project like view. Is there, or soes someone know a controls which is able to handle that for me, or do I need to create it myself? Thnx, Eduard I love it when a plan comes together

    Visual Basic csharp question

  • CrossTab Sql Server 2000
    N nikneem2005

    Hey guys... I have a very simple question with probably a very difficult answer (for me :)) I have a view, containing three fields I want to create a crosstab with. A Date (should be the 'row' header) A Name (should be the 'column' header) and a Total (number) field. Can anyone 'introduce' me into SQL, cause i'm very very very new into these kind of queries (probably SP's) I love it when a plan comes together

    Database sharepoint database sql-server sysadmin question

  • How to prevent "save as" in tool bar ?
    N nikneem2005

    I'm from The Netherlands, my English isn't that well :-) Modified the message, hope you understand it now... don't mess with IE functions, leave them alone :) I love it when a plan comes together

    ASP.NET question html tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups