Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:707446
More Search Options
RSS Available
Matching Posts
Re: Generics and the Type object
[quote user="pauldavidson"]I have the need to create a generic class, however I will not know when I instantiate the object what type it will be, all I will have is the string of what type it should represent. [/quote] Why do you want to/need to do this? I think that you're trying to complicate something that could be simpler. The point of generics is to be able to work with strongly typed, but somewhat flexible implementations. Can you explain a little further what you're really
Posted to
C#
(Forum)
by
Svante
on 11/10/2009
Re: how to get base type functionality?
[quote user="mariafinley"] how to implement class that extend base type functionality.[/quote] As mentioned, you can't extend the System.String class. You should not implement extension methods unless you specifically need them. They are fraught with some real dangers, and they make the code much less readable when misused. You have two choices basically: Implement a (static) helper method of a suitable class to do your custom parsing. Implement a wrapper object for your specially formatted
Posted to
C#
(Forum)
by
Svante
on 11/10/2009
Re: Generics and the Type object
[quote user="SvDeursen"]it's a premature to conclude that this isn't the right approach[/quote] Absolutely! I'm sorry if I gave that impression. I do, however, suspect that it isn't the right approach - but I'm hoping for some more info about the actual case. Generally speaking, when there really is a good reason for this very dynamic approach, perhaps C# is not the language of choice... Certainly possible, but perhaps not the best choice of tool. Then again, it might
Posted to
C#
(Forum)
by
Svante
on 11/10/2009
Re: how to call static class?
In a standard Web Project, you should place common utility code in the App_Code folder. This will cause ASP.NET to compile it into an assembly that is available to your other code in code behinds and .aspx files etc.
Posted to
C#
(Forum)
by
Svante
on 11/10/2009
Re: overloading existing String method
[quote user="thewatcheruatu"]extension methods, but didn't want to get all into that unless I knew that I had [/quote] Extension methods should indeed be avoided unless required. In this case, they will not help you since an extension method does *not* override an existing method of the same signature. The correct answer to your original question "overloading existing String method" is: You can't and you should not. You can, but should probably not, create an extension
Posted to
C#
(Forum)
by
Svante
on 10/19/2009
Re: namespace guidlines
Golden rule: Write for human readers, not compilers or tools. Code is typically write once or twice, read many. Therefore: If your class is a business object forge, should should certainly name it BusinessObjectForge (and use HostingSolutions as the namespace to answer your original question). Bytes are cheap but people are expensive, and with Intellisense you don't even have to exercise your fingers to type them...
Posted to
C#
(Forum)
by
Svante
on 10/19/2009
Re: convert to byte to binary
[quote user="munish_ps"]the right way of converting[/quote] The right way of converting depends on what you're getting as input. You say you "loose a lot of data" when you use the UTF8-decoder, that's probably because what you're getting is not UTF-8 encoded text. Your BitConverter.ToString() will get a hexadecimal representation of the binary data - you'll still have to interpret it to something useful with. You have to *know* what your input is. What is your
Posted to
C#
(Forum)
by
Svante
on 10/19/2009
Re: Using MD5 for password storage
[quote user="eddy556"]MD5 is still suitable for encryption[/quote] This is just the point. By asking this question, you clearly indicate that you are not experienced enough in this field. MD5 is a cryptographic hash. Not an encryption algorithm. It is never used for encryption. (Correction - it should never be used for encryption, but I am aware of people who mistakenly do...) Passwords should not be encryped. They should be hashed. With a cryptographically strong hashing algorithm, which
Posted to
Security
(Forum)
by
Svante
on 10/19/2009
Re: Using MD5 for password storage
Let's see if I can say this in a nice way. Assuming web site security is important (some would even say that it's vital), it should be fairly clear that to implement it, the implementer must know how to do so. From your initial attempt, the main question, and follow up question, I can only conclude that you do not yet have the experience required to implement such a function. In fact, few do. Unfortunately, this is not as easy as just putting you right on the main issues above (no, MD5 is
Posted to
Security
(Forum)
by
Svante
on 10/19/2009
Re: e-mail sending failed after deploying the page on website
To elaborate a bit: Your hosting provider, or equivalent, appears to have restricted SMTP access. Exactly how is hard to tell, if you look at http://msdn.microsoft.com/en-us/library/system.net.mail.smtpaccess.aspx you'll see there are two levels of restriction 'Connect' and 'None'. If your hosting provider has set 'None' you're out of luck, if it's 'Connect', you'll probably just have to ask them for the name of a relaying smtp server that they do allow
Posted to
Configuration and Deployment
(Forum)
by
Svante
on 9/17/2009
Page 1 of 225 (2241 items) 1
2
3
4
5
Next >
...
Last »
WindowsClient:
Introduction to TestApi – Part 5: Managed Code Fault Injection APIs
ASP.NET:
T4MVC now has a real home and a dedicated forum!
TechNet Edge:
Windows Server 2008 R2 : New Power Management Features
ASP.NET:
Web Deployment Painkillers: VS 2010 & MS Deploy
WindowsClient:
Application Accessibility Testing
WindowsClient:
Prism & WCF RIA Services
Channel 9:
Sharepoint 2010 and Claims-Based Identity
WindowsClient:
IRhetoric Ported To BlogEngine.NET
WindowsClient:
PDC Recap and More
Channel 9:
Reactive Extensions API in depth: Primitives
WindowsClient:
New WPF Features: MultiTouch
WindowsClient:
codeplex.com/testapi v 0.4 available
Channel 9:
The Visual Studio Documentary - Alan Cooper, the Father of Visual Basic
Channel 9:
Hanselminutes on 9 - Guided Tour inside the Windows Azure Cloud with Patrick Yantz
ASP.NET:
ASP.NET 4.0 ScriptManager Improvements
WindowsClient:
XAML Toolkit CTP = FxCopXaml + XamlDom + System.Xaml.dll support for Silverlight XAML
Channel 9:
Fishbowl for Facebook
WindowsClient:
Free Embeddable Fonts for your WPF Applications
ASP.NET:
Program Manager Position on the ASP.NET PM team
Channel 10:
Microsoft Teams Up with Nielsen
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online