.NET 3.5 doesn't completely support XPATH 2.0 or XSLT 2.0, which is just too bad. Does anyone know if these two will be included and fully supported in any future .NET versions?
Hello
I have Motorola MC55 with Windows Mobile 6.5 on-board. This nice palm contains also an embedded bar-code scanner. My question is - Will I need anything special in .NET CF in order to use the bar-code scanner? I would expect that the bar-code are read as normal strings and delivered as keyboard events? Is any special .NET CF library necessary?
Thanks for help
Dominik
I want to use inflector.net in my project.
Just googled and it seems to have gone. :-<
http://andrewpeters.net/inflectornet/
Are there any alternatives?
Which .NET programming libaries do you use most ?
I'm putting together a list, kind of "best of" SourceForge, CodePlex, Google Code, GitHub, etc.
SourceForge.NET
Nhibernate (database ORM)
SharpZipLib (ZIP compression)
itextsharp (PDF library)
GitHub:
JQuery (JavaScript)
Google Code:
aforge (imaging)
Codeplex:
Excel Data-Reader
Other:
bouncycastle.org (Encryption)
I've been looking into several JSON parsers for .NET (LitJSON, JsonExSerializer and JSON.NET), and was wondering if anyone has any experience with them and can shed some light on the differences and the pros and cons for each of them.
I am new to .NET, and don't have much experience in programming.
What is the standard way of handling user authentication in .NET in the following situation?
In Process A, User inputs ID/Password
Process A sends the ID/Password to Process B over a nonsecure public channel.
Process B authenticates the user with the recieved ID/Password
what are some of the standard cryptographic algorithms I can use in above model?
how can i control swf background transparency in vb.net.........either with flash.ocx or if there is any other way.......so that if i have a swf animation block with red in background and some text written with yellow.......now how can i remove that red background in vb.net...actually i want to make a system so that i can choose any color as transparency key for swf.........like in tv channels logos.......etc
I was wondering if there was a way I could program and compile .net applications (c#, asp.net mvc) from a usb stick on any laptop I plugged in.
I am lookinjg for a solution that does not have me installing programs on the laptop, so I have to be able to run an ide or editor from an exe and compile presumably from command line.
Was also wondering if I can run MS test projects from command line to check tests passed etc.
Thanks
We are looking for a .NET PDF creator. It needs to be .NET, so we can just copy the file(s) onto the server, not having to install anything.
We only need to create a PDF with some text and images and a heading, that's all.
Anyone know a good one? We are happy to buy if there is a good one that is easy to use.
Thanks in advance.
I've .NET framework 3.5 installed in my laptop. Just .NET alone, no Visual Studio. How can I run Java, Python, Ruby and Perl programs from the console? What are the commands used for running them?
Do I need to install something else also, for running these language files?
This quick tip will show how you can write a custom view for a custom controller action in Orchard that does not use the current theme, but that still retains the ability to use shapes, as well as zones, Script and Style helpers. The controller action, first, needs to opt out of theming: [Themed(false)]
public ActionResult Index() {}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Then, we still want to use a shape as the view model, because Clay is so awesome:
private readonly dynamic _shapeFactory;
public MyController(IShapeFactory shapeFactory) {
_shapeFactory = shapeFactory;
}
[Themed(false)]
public ActionResult Index() {
return View(_shapeFactory.MyShapeName(
Foo: 42,
Bar: "baz"
));
}
As you can see, we injected a shape factory, and that enables us to build our shape from our action and inject that into the view as the model.
Finally, in the view (that would in Views/MyController/Index.cshtml here), just use helpers as usual. The only gotcha is that you need to use “Layout” in order to declare zones, and that two of those zones, Head and Tail, are mandatory for the top and bottom scripts and stylesheets to be injected properly. Names are important here.
@{
Style.Include("somestylesheet.css");
Script.Require("jQuery");
Script.Include("somescript.js");
using(Script.Foot()) {
<script type="text/javascript">
$(function () {
// Do stuff
})
</script>
}
}
<!DOCTYPE html>
<html>
<head>
<title>My unthemed page</title>
@Display(Layout.Head)
</head>
<body>
<h1>My unthemed page</h1>
<div>@Model.Foo is the answer.</div>
</body>
@Display(Layout.Tail)
</html>
Note that if you define your own zones using @Display(Layout.SomeZone) in your view, you can perfectly well send additional shapes to them from your controller action, if you injected an instance of IWorkContextAccessor:
_workContextAccessor.GetContext().Layout
.SomeZone.Add(_shapeFactory.SomeOtherShape());
Of course, you’ll need to write a SomeOtherShape.cshtml template for that shape but I think this is pretty neat.
Hi,
I'm using paypal payment method in my druapl site, i want to change that to authorize.net how can i change the existing paypal payment method to authorize.net in my drupal site
please help me
Thanks
Hi Folks
I've read through a lot of the "Learn C# .Net" questions just to see if this question was answered already (directly or indirectly).
I program mostly in C++ so I find the website http://www.cplusplus.com/ invaluable and there's rarely a day when it is not open in my browser! However, I'm just wondering is there an C# .Net equivalent that people find themselves constantly referencing?
The best I'm aware of is:
http://stackoverflow.com
http://msdn.microsoft.com/en-us/vcsharp/aa336809.aspx
http://www.java2s.com/Tutorial/CSharp/CatalogCSharp.htm
Thanks,
The Pager shape that is used in Orchard to render pagination is one of those shapes that are built in code rather than in a Razor template. This can make it a little more confusing to override, but nothing is impossible. If we look at the Pager method in CoreShapes, here is what we see: [Shape]
public IHtmlString Pager(dynamic Shape, dynamic Display) {
Shape.Metadata.Alternates.Clear();
Shape.Metadata.Type = "Pager_Links";
return Display(Shape);
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
The Shape attribute signals a shape method. All it does is remove all alternates that may exist and replace the type of the shape with “Pager_Links”. In turn, this shape method is rather large and complicated, but it renders as a set of smaller shapes: a List with a “pager” class, and under that Pager_First, Pager_Previous, Pager_Gap, for each page a Pager_Link or a Pager_Current, then Pager_Gap, Pager_Next and Pager_Last.
Each of these shapes can be displayed or not depending on the properties of the pager. Each can also be overridden with a Razor template. This can be done by dropping a file into the Views folder of your theme. For example, if you want the current page to appear between square braces, you could drop this Pager-CurrentPage.cshtml into your views folder:
<span>[@Model.Value]</span>
This overrides the original shape method, which was this:
[Shape]
public IHtmlString Pager_CurrentPage(HtmlHelper Html, dynamic Display,
object Value) {
var tagBuilder = new TagBuilder("span");
tagBuilder.InnerHtml = Html.Encode(Value is string ?
(string)Value : Display(Value));
return MvcHtmlString.Create(tagBuilder.ToString());
}
And here is what it would look like:
Now what if we want to completely hide the pager if there is only one page? Well, the easiest way to do that is to override the Pager shape by dropping the following into the Views folder of your theme:
@{
if (Model.TotalItemCount > Model.PageSize) {
Model.Metadata.Alternates.Clear();
Model.Metadata.Type = "Pager_Links";
@Display(Model)
}
}
And that’s it. The code in this template just adds a check for the number of items to display (in a template, Model is the shape) and only displays the Pager_Links shape if it knows that there’s going to be more than one page.
Hello, I have used ADO.net entity framwork to build my application. My application's data diagram contains 2 bridge entities. The problem is that I can not see or access these bridge entities in ADO.net framework using domain services. Do you have any idea how to use CRUD operations on them?
Regards,
Please tell me how can i add such a launch condition to my desktop application setup (.net) so that, Only install the software if the revision level is high than that shown in the registry file. Where installation occurs update the registry file.
Please help me out.. i am using VS2005 (c#.net)
Hi,
I want to develop an application in VB.net for handheld device(Ticket machine in Bus and train).Is it possible to develop in Vb net.
Whether i need windows OS in my handheld device or any runtime environment only needed.
My hardware is ARM processor.
I want to run my application as standalone in my machine.
Well basically I've got a vb.net script connecting to IRC, and I'm working on making it a basic chat system, but I've run into a problem.
Say I receive this:
:[email protected].net PRIVMSG #channel :message
I want to grab specific information to output to the user.
I want to grab nickname and message
How can I go about doing this?
I thought about using regex, but I can't figure out how to make regex grab message since there's nothing after it.
For a company that has their stack built on Apache Tomcat and JSP what would be the best web service platform to be leveraged by that infrastructure that would be consumed by .NET client.
From the .NET side I know the answer would be Windows Communication Foundation (WCF) but I'm not sure from the other side.
I'm working on a java class that I will use with Pervasive Data Profiler that needs to check if a Date String will work with .NET's DateTime.Parse.
Is there an equivalent class or 3rd party library that can give me this functionality that is very close to .NET's DateTime.Parse?
I have a COM object written in managed code (C++/CLI). I am using that object in standard C++.
How do I force my COM object's destructor to be called immediately when the COM object is released? If that's not possible, call I have Release() call a MyDispose() method on my COM object?
My code to declare the object (C++/CLI):
[Guid("57ED5388-blahblah")]
[InterfaceType(ComInterfaceType::InterfaceIsIDispatch)]
[ComVisible(true)]
public interface class IFoo
{
void Doit();
};
[Guid("417E5293-blahblah")]
[ClassInterface(ClassInterfaceType::None)]
[ComVisible(true)]
public ref class Foo : IFoo
{
public:
void MyDispose();
~Foo() {MyDispose();} // This is never called
!Foo() {MyDispose();} // This is called by the garbage collector.
virtual ULONG Release() {MyDispose();} // This is never called
virtual void Doit();
};
My code to use the object (native C++):
#import "..\\Debug\\Foo.tlb"
...
Bar::IFoo setup(__uuidof(Bar::Foo)); // This object comes from the .tlb.
setup.Doit();
setup-Release(); // explicit release, not really necessary since Bar::IFoo's destructor will call Release().
If I put a destructor method on my COM object, it is never called. If I put a finalizer method, it is called when the garbage collector gets around to it. If I explicitly call my Release() override it is never called.
I would really like it so that when my native Bar::IFoo object goes out of scope it automatically calls my .NET object's dispose code. I would think I could do it by overriding the Release(), and if the object count = 0 then call MyDispose(). But apparently I'm not overriding Release() correctly because my Release() method is never called.
Obviously, I can make this happen by putting my MyDispose() method in the interface and requiring the people using my object to call MyDispose() before Release(), but it would be slicker if Release() just cleaned up the object.
Is it possible to force the .NET COM object's destructor, or some other method, to be called immediately when a COM object is released?
Googling on this issue gets me a lot of hits telling me to call System.Runtime.InteropServices.Marshal.ReleaseComObject(), but of course, that's how you tell .NET to release a COM object. I want COM Release() to Dispose of a .NET object.
In a scenario where webMethods Composite Application Framework (CAF) experienced developers are hard to find, compared to .Net, this question comes into play: does webMethods CAF have .Net integration capabilities?
Hi, I'm building an app using ASP.NETMVC which I want to use a strongly type view model, which contains a List called items which contains an id int and itemName string. The view model also conatins a List called people, and the Person class contains a List.
The way I want to display the information is as a table, with each row having a column of Person name, then n number of columns which contain checkboxes, one for each of the List, and checked based on whether the Person's List (called items) contains the id of the Item.
I have the display working fine, but I'm struggling to understand how to name the items so that the posted method can read the data.
This is what I have in the BeginForm:
<table cellpadding="20">
<thead>
<th>Person name</th>
<!-- for each of the items, create a column with the item name -->
<% foreach( var i in Model.items ) { %>
<th><%= Html.Encode(i.itemName) %></th>
<% } %>
</thead>
<% foreach( var p in Model.people ) { %>
<tr>
<td><%= Html.Encode(p.name) %></td>
<!-- for each item, create a column with a checkbox -->
<% foreach( var i in Model.items ) { %>
<td>
<% if( p.items.Contains(i.id) ) { %>
<!-- vm is the name of the view model passed to the view -->
<%= Html.CheckBox( "vm.people[" + p.id + "].items[" + i.id + "]", true ) %>
<% } else { %>
<%= Html.CheckBox( "vm.people[" + p.id + "].items[" + i.id + "]", false ) %>
<% } %>
</td>
<% } %>
</tr>
<% } %>
</table>
And this code displays the information perfectly. When I click submit, however, I get an Object Reference Not Set.. error message.
Can anyone help with this please?