|
I know this is question that has been asked before, but things change, new projects emerge, etc., and I was hoping to get some recommendations.
Basically all I am looking for is a halfway decent free (or cheap) .NET Winforms WYSIWYG HTML editor control. I have played with a couple old .NET 1.{0,1} controls and while they render and generate html output, the ones I have found tend to have serious usability problems (such as not really accepting newlines correctly or 100% of the time.
Thanks for your time
--Scott
|
|
|
|
|
The only decent one I've found so far is Lutz Roeders: Writer[^] .
However, you have to do some modification to it because he has written it to be a standalone app. (Source code is provided)
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
Thanks - Looks good, I'm getting scrubbed up for surgery now
|
|
|
|
|
thechillhacker wrote: I'm getting scrubbed up for surgery now
Let me know how it turns out. One thing that discouraged me from using it was that it doesn't seem to respond to normal .Net events: Click, MouseDown, etc. Maybe I just didn't do enough surgery.
If all goes well, I highly encourage you to zip the code and post an article about it.
Cheers!
Richard
If my answer has helped you, one of my articles may also be a help. Also remember that your best friend's name is google.
|
|
|
|
|
Hi
In C# (other .Net OOP languages as well), I have 2 webservices. Svc1 returns a complex datatype which becomes the parameter for svc2. Note that it is the same complex type.
Now, I create the 2 proxy classes of these 2 webservices. Which means the same type gets generated twice.
How can I make sure that in 2 proxies only one copy of that type is there? You may assume same or different namespaces of 2 webservices.
Thanks
AJ
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
mittalpa wrote: You may assume same or different namespaces of 2 webservices.
Sounds like a homework question to me. Try google.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I did .. but not sure how to exactly word it in search. that's why this post.
thanks anyway..
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Hi everybody, I've made a POS System and @ the exit I want to make an automatic Backup which copies the database to some place ... but it says the database is used ... & I tried to find where it is unclosed (it is thousand of lines of code).... and I cant get it ... so can anybody help me ... how write some line of code which will close any opened connection to that database? ..
Thank you
|
|
|
|
|
Perhaps Management Studio has the database open? If so, you have to close Management Studio; I don't think you can close another application's connection, at least it shouldn't be your standard operating method.
modified on Thursday, December 3, 2009 2:19 PM
|
|
|
|
|
I didnt get what you said... Can you elaborate it to me
|
|
|
|
|
I knew that... but wat i wanted is how to close all connections that are opened @ that time
|
|
|
|
|
Do you know how to use google?
I tried with - "kill connections sql server" and all of the top 10 results had the answer.
|
|
|
|
|
BUT, to kill connections (not your own) you need sa rights, not something which most accounts should have.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Yap, this is true, but if you are building an administrative module you should grant this kind of rights to the admin of the application.
|
|
|
|
|
Shorgov wrote: you should grant this kind of rights to the admin of the application.
Matter of opinion. It allows far to much damage to be done - do you really want to give a user the right to drop tables etc?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Only to the appropriate user
In general I am agreed with you, but user not allays means dumb person. User of this admin module can be a developer(responsible for the maintenance of the system ) or a trained consultant who knows what he is doing.
|
|
|
|
|
Dear friends..
i have small problem ..
this is my code
private DateTime convertByteToDatetime(byte[] Data)
{
try
{
DateTime now = DateTime.Now;
byte[] year = new byte[2];
year[0] = Data[0];
year[1] = Data[1];
int nYear = convertByteToInt(year);
DateTime dt = new DateTime(nYear, (int)Data[2], (int)Data[3], (int)Data[4], (int)Data[5], (int)Data[6]);
return dt;
}
catch
{
return (null);
}
}
in Catch block i can't return null because Datetime is value type
i do not want to return any date if there is an error....
What shall i do..
Any idea.? suggestion?
By
joe
|
|
|
|
|
You have two options. You could return default(DateTime); or change the return type to Nullable<DateTime>
[edit] You could also rethrow the exception. I find this a tad ugly, but whatever works for you
modified on Thursday, December 3, 2009 12:05 PM
|
|
|
|
|
Thank Your friend ...
for Your replay ..
0x3c0 wrote: Nullable<datetime>
what this line will return? sorry i do not know.
how to use this Nullable<datetime>?
syntax please?
thank U
|
|
|
|
|
You replace private DateTime convertByteToDatetime(byte[] Data) with private Nullable<DateTime> convertByteToDatetime(byte[] Data) . Then you can either return new Nullables, or just keep your code and rely on the implicit operators. If you do that, you don't need to do anything apart from checking HasValue in your calling code. If that's true, then retrieve value.
Example:
Nullable<DateTime> nullableDate = convertByteToDatetime(new byte[] {0, 0, 0});
if(nullableDate.HasValue)
else
However, please be aware that this will call your code to fail silently. I would personally raise an event detailing the exception before I return null so that I know precisely what went wrong without having to sprinkle try-catch blocks everywhere.
|
|
|
|
|
Thank You frined .....
i shall try that .
|
|
|
|
|
=>Joe<= wrote: if there is an error...
... throw an Exception.
|
|
|
|
|
thanks for your replay...
PIEBALDconsult wrote: ... throw an Exception.
i do not want stop the process ... in other words i have skip to othere work ..
thank U
|
|
|
|
|
That's up to the calling routine to decide.
|
|
|
|
|
=>Joe<= wrote: Any idea.? suggestion?
AFAIK there are four popular ways, you've had most of them already:
1.
set aside a special value, could be Default<DateTime> or any other value you don't need as a real value. For DateTime, there is also DateTime.MaxValue
2.
nullable types, written either as Nullable<DateTime> or DateTime? (with question mark)
I don't like them much as they take more memory, and cause some trouble when parts of your environment don't know how to handle them (e.g. files, databases, ...).
3.
Use an Exception. That often is the most elegant approach, assuming the "no value" situation really is exceptional.
[ADDED, AS SUGGESTED BY PIEBALD]
4.
Return a boolean and have the value in an out parameter. Like with TryParse.
[/ADDED]
modified on Thursday, December 3, 2009 2:59 PM
|
|
|
|