|
Did you read your question before posting? It's a good practice...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Sorry , I got answer of my question.
|
|
|
|
|
It depends what you are doing - to hack together a simple ASP.NET winforms style web app, then asp.net is probably going to be easier. Where MVC wins is where you actually want to create websites, or sites with more modern features (for example AJAX calls, exposing a REST API), then MVC3 wins IMO.
The other thing you have to take into account is the learning curve: if you've been an asp.net "forms" developer for 2 years and you switch to MVC, then you're already 2-years behind more or less, and you have to stop using a lot of techniques you've become used to.
So the answer is, if you've gained a similar amount of experience/expertise in both technologies and one has taken more effort than the other one, you've chosen the wrong tech.
|
|
|
|
|
Thanks a lot ,
|
|
|
|
|
What is Extension Method in C# and when i can use it ?
|
|
|
|
|
|
An extension method is a piece of code that allows you to extend a type with custom functionality. This feature was introduced alongside LINQ. Suppose you wanted to add the ability to check whether or not an integer was within a certain range, you would declare a static method inside a static class (this is required for extension methods), that passed in the parameter in a special way. Here's this example
public static class IntegerExtensions
{
public static bool Between(this int value, int startRange, int endRange)
{
return value >= startRange && value <= endRange;
}
} To call this you would do something like this:
int checker = 10;
if (checker.Between(0, 50)
{
Console.WriteLine("I'm in the range");
} Now, if you want to use the extension method, you have to make sure that the namespace for the static class is included in the file that you are calling the extension from. Also, there's nothing to stop you writing this code as well
if (IntegerExtensions.Between(checker, 0, 50)) Ultimately they resolve to the same thing.
|
|
|
|
|
What sort of pond life would downvote such an excellent answer to a question? Compensation provided.
|
|
|
|
|
Thanks. I have to admit, I was surprised by the vote as I thought I'd given a clear enough start to get someone on the way with extension methods. Oh well
|
|
|
|
|
Hi
I have about 1000 2d points that I draw a ClosedCurve on bitmap then on picturbox, but I want saving a few points from this 1000 points that are necessery to drawing previous ClosedCurve or shape.
Thanks
|
|
|
|
|
What have you tried, where exactly are you stuck?
What do you mean when you say saving? When will you draw that previous ClosedCurve? When the application restarts? When the user hits the undo button? On the whim of a butterfly flapping its wings ?
Give us more info, so we better understand the question.
|
|
|
|
|
thanks, suppose we have an image that contain a shape like "s", this "s" formed from thousands points or pixels. well, we want drawing a shape like "s" whit .DrawCurve method in C# but we don't want .DrawCurve accept that thousnds parameter(or points). we want detect a few number of point that are critical(in mathemathics) or necessary points then draw same shape("s"). of course if we detect this points we can use DrawLine or DrawBezier and etc methods to draw same shape("s").
|
|
|
|
|
how to read .Zim file in C#
|
|
|
|
|
Well, you're probably going to need to write something that implements the .ZIM file format[^]. There is no default implementation in the BCL.
|
|
|
|
|
I am able to create a XML file with:
="1.0"="ISO-8859-1"
with the following codes:
XmlWriterSettings settings = new XmlWriterSettings();
settings.Indent = true;
settings.Encoding = Encoding.GetEncoding("ISO-8859-1");
XmlWriter writer = XmlWriter.Create("C:\\XML files\\XML_File.xml", settings);
How can I add standalone="no" after encoding="ISO-8859-1" as
="1.0"="ISO-8859-1"="no"
Thanks for any help
|
|
|
|
|
|
When I use the link and set:
writer.WriteStartDocument(true) ; then I have
="1.0"="ISO-8859-1"="true"
However when I set:
writer.WriteStartDocument(false) ; then I have
="1.0"="ISO-8859-1"
*) What I need as mentionned before:
="1.0"="ISO-8859-1"="no"
Thanks for help, we are close!
|
|
|
|
|
|
Thanks for the link, it is OK if I viewing my xml file with Notepad!
|
|
|
|
|
I had the same problem. I had to go with XmlDocument:
XmlNode docNode = doc.CreateXmlDeclaration("1.0", "iso-8859-1", "no");
I'm guessing you are viewing this in a browser instead of a text file. One thing that you may notice is that the "ISO" becomes capitalized in a browser, but if you look at it with a text editor like Notepad, it looks the way you want it. Also, the browser translates "no" to "false". If you want to see what it looks like exactly, use Notepad.
You might also try this:
XmlSerializer xmlSer = new XmlSerializer(typeof(T));
using (MemoryStream mem = new MemoryStream())
{
using (XmlWriter writer = XmlWriter.Create(mem))
{
string doubleQuote = ((char)34).ToString();
string s = "version=" + doubleQuote + "1.0" + doubleQuote + " encoding=" + doubleQuote + "iso-8859-1" + doubleQuote + " standalone=" + doubleQuote + "no" + doubleQuote;
writer.WriteProcessingInstruction("xml", s);
xmlSer.Serialize(writer, objectToSerialize);
}
}
modified 20-May-14 19:51pm.
|
|
|
|
|
Yes, you are right about seeing it with Notepad which I have:
Thanks for clarifying it
|
|
|
|
|
I need to add onclick method to textbox inside grid.In this scenerio i can bind the client id the get the value of that grid item inside javascript method or can bind directly the value to the javascript method which is the best way for implementation
1. binding the client id and getting the value
txtbx1.attributes.add("onclick","Getvalues('txtbx1')");
If i am passing id javascript will search complete html,so performance will be less
2. Bind value directly to the method
txtbx1.attributes.add("onclick","Getvalues('20')");
No need to search get the value directly performance will be good
My answer is 2 .
|
|
|
|
|
|
Hi,
Anyone know this link[^] looks like MSDN has posted all the major used dll source code that can be downloaded.
_AKA_KSN_
|
|
|
|
|
Please, only post in one forum only. Duplicate posts aren't appreciated.
|
|
|
|