Hi
I have a method
RenderToString(string pathToView, string pathToMasterPage)
which, like the name already says, renders a view and returns the result as a string. Currently I have to pass the path to the master page as a paramter to the method. But since the view itself allready contains the definition of the master page
<%@ Page...
I can't remember exactly where I've seen this strange '1 (single-tick and the number 1) appearing next to classnames, but it's shown up when inspecting variable values while debugging and most recently in the answer to this question.
targetClass.BaseTypes.Add(new CodeTypeReference { BaseType = "DataObjectBase`1[Refund]", Options = CodeT...
I have .eml files saved on my hard drive and i'd like to write a .net method that would be along the lines of Sub LoadMessage(byval path as String). How would I go about doing this?
I'm using .Net 2.0 - and C# or VB.Net either will work. Would I open a filestream object with the given file? I just don't know how to get it from the st...
I have an asp.net web page that has a TinyMCE box. Users can format text and send the HTML to be stored in a database.
On the server, I would like to take strip the html from the text so I can store only the text in a Full Text indexed column for searching.
It's a breeze to strip the html on the client using jQuery's text() function, ...
Noticed this today when a patch was submitted with the following line:
lblCompletionTime.Text = String.Concat(trainingSkill.EndTime.ToLocalTime())
I can understand why the contributor used that syntax as above line concatenated two strings to form a multi-part date/time string.
Is there some hidden reason for having a single paramete...
I am looking into performance issues of a large C#/.NET 3.5 system that exhibits performance degradation as the number of users making requests scales up to 40-50 distinct user requests per second.
The request durations increase significantly, while CPU and I/O loads appear to stay about the same. This leads me to believe we may have pr...
I just tried to move one of WCF service to windows authentication. using this connection string
<add name="MembershipConnection" connectionString="Data Source=DBADDRESS ;Initial Catalog=aspNetMembership;Persist Security Info=True;Integrated Security=SSPI;"/>
WCF service is hosted in IIS (2003) and the user I have setup under 'Directory...
I've got a fairly big XML file that I need to parse into a .NET class structure (to be mapped to a fixed-length record format and transmitted via MQ). Performance is important, but not absolutely critical.
I almost always use XPathNavigator to read XML files because it's much easier than XmlReader. On the other hand, I know XmlReader i...
I downloaded MySql Connector/NET, and set it as a reference in my project.
I added the using MySql.Data.MySqlClient; to my code.
Now I tried initializing a connection like this:
MySqlConnection test = new MySqlConnection(Utilities.GenerateMySqlConnectionString("localhost", "test", "root", ""));
However I cannot use this object later....
Here's the troublesome bit of code. Note that the NullReference Exception is throw for the variable TR, but PS is just fine. Any idea what could be happeneing?
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
''// set up the controls
Dim PS As Integer
Dim TR As I...
Hello,
In my ASP.NET MVC web application, I have:
Domain Model, created by LINQ to SQL
Repositories such as
UserRepository and OrderRepository
IQueryable Fluents as IQueryable Extension Methods such as
public IQueryable<Order> GetNewOrders(this IQueryable<Order>)
Services such as
UserService and OrderService
Utility Classes and Ex...
I created a simple .NET console application and within it I start 3 managed threads. Each thread executes the following loop:
while (true)
{
System.Console.WriteLine(thread.Name + " " + DateTime.Now);
Thread.Sleep(10);
}
I set the first thread's priority to high and let the app run for ...
Forgive me if my terminology is a little off. My knowledge of managed C++/CLI is very limited.
I have an MFC application that uses a dll with the /clr option enabled. This dll uses a couple of C# dlls to communicate with a server using WCF. For the most part this works fine.
In one of the C# dlls, I've added an extension method to t...
I'd like to get hold of version 2.0.50727.832 of System.Windows.Forms.dll - does anyone know where I can find it, without installing the correpsonding version of the .NET Framework?
Background: A customer has just reported a crash in my product. I believe it's due to a bug in a previous version of the .NET framework, which is fixed in ...
In Windows Forms, is it possible to configure a drop-down combobox control so that the items are right justified?
The default is left justified, like this:
...
I am attempting to access a queue and receiving an access denied error. The confusing part is the queue is setup to allow everyone at full control as well as anonymous and machinename$ (all three are full control - it's a test system so not a big deal). I am able to successfully write to the queue but can't Peek/Read/Receive from it. I f...
The following F# code works as I expected, printing `Matched as 'A':
let (|Char|_|) convf = function
| LazyList.Nil -> None
| LazyList.Cons (x, _) -> Some (convf x)
let test = function
| Char System.Char.ToUpper x -> printfn "Matched as %A" x
| _ -> printfn "Didn't match"
test (LazyList.of_list ['a'])
However, if I c...
I want to be able to make use of LDMA or RDMA on a Windows CLR-based application (.NET). I have low-latency applications being developed with C++ and those applications will receive their data using LDMA or RDMA. I'd like our CLR applications to use the same API with the understanding that there is probably going to be a performance hi...
I have base class BaseClass and derived classes DerivedA, DerivedB, and DerivedC that all inherit BaseClass.
I have another class, ExternalClass with a method that accepts a parameter of type BaseClass, but is actually passed a derived class. What is the best way to differentiate between these classes in ExternalClass if I wanted to per...
I am having an issue rendering images in flash via a character array. I am sending it from a webhandler via Context.Response.Write as a Base64CharacterArray. It functions 100% properly in a windows environment, however when using a Mac the image data is not retrieved correctly causing the image to appear incorrectly. It does not affec...