In my unit tests, I find that when I return from a controller action using View() with no view name, ViewResult.ViewName is set to string.Empty. In order for this to be set, it has to be specified as a parameter to the View() call. For example, given the following unit test:
[TextFixture]
public class MyControllerTests
{
[Test]
...
Possible Duplicate:
Any way to prevent master pages from changing element IDs?
Hi
I have a .net 2.0 web page that is using a master page. On the page in question is a form and I am trying to call one of the sub element. The form element name is:
"contact_label" - its an asp:Label
But when I look at the source I am getting ...
The obvious attempt is:
Regex.Replace(input, @".$", "X", RegexOptions.Singleline);
This doesn't always work though. Consider the string \r\n\r\n - the above produces the surprising result of \r\nXX. One might expect from reading MSDN (under Multiline) that $ should match just at the end of the entire string, but apparently $ actually ...
I'm using an HttpWebRequest that has a CachePolicy of HttpRequestCacheLevel.Reload. When doing a GET the "Pragma: no-cache" header is in the request (as tracked through Fiddler). But when doing the exact same request using a POST then the "Pragma: no-cache" header is not included.
Is there a reason for this? Is it a bug? And is there a ...
I have a very simple Webmethod (asmx) that creates a file. For some reason, it times out. When I step through the code, the code that creates the file takes < 1 second, but when I get to the last line of the method, it times out.
Any reason why this might be happening? I use System.Speech in the webmethod.
[WebMethod]
public void Synth...
Is there any API available, that can be used in .net that can read/extract 7z files ?
...
Hey Guys,
I'm making a C# image gallery for a website (I know there's many free ones out there, but I want the experience). I'm grabbing files from a directory on the website by storing them in a array.
protected void Page_Load(object sender, EventArgs e)
{
string[] files = null;
files = Directory.GetFiles(Server....
Is there any way to include an embedded font with a pdf export from the .NET report viewer control?
...
I'm just starting to get into ASP.NET MVC, and saw today that the Beta of version 2 has been released.
Should I start on MVC 1 given that there are already a lot of great resources and tutorials? Or should I go straight to MVC 2 to take advantage of whatever improvements have been made?
I'm thinking about breaking this into another qu...
dear all , I created an installer in .Net , when i run that Installer (.msi) on windows 7, it show a popup unsecured publisher do you want to continue. How can i set the publisher. Kindly help. thanks
...
I would like the ability to have a test ClickOnce server for my applications where users can run both the production version and the test version in paralell. Is this possible?
I first tried using the following in AssemblyInfo.cs and also changing the name in the ClickOnce deployment though all this achieved was overwriting the users pr...
Genuine Channels is a set of 3rd party chancels for .Net Remoting.
I have been given the tasks of replace the usages of .Net Remoting in a rick client and server with WCF. I am familiar with standard .net remoting but not Genuine Channels.
So what problems should I expect and any pointers to the solutions?
...
I use following code to populate a Combo Box. It displays: System.Data.DataRowView instead of the actual column values in it. What I am missing?
string Query = "SELECT institutename FROM institutemaster";
DataSet ds = new DataSet();
MySqlDataAdapter da = new MySqlDataAdapter(Query, ConnectionClass.CN);
da...
I have a UserControl that incorporates a textbox. I want to set the keyboardfocus to this textbox programmatically when the user clicks a button.
I tried this:
private void Button_Click(object sender,EventArgs e)
{
Keyboard.Focus(MyUserControl);
}
no luck. Then I exposed the Textbox in the UserControl though a property of type TextB...
Hi I have some doubts in the memory allocation of the reference types.Please clarify my questions that are commented in between the code below.
class Program
{
static void Main(string[] args)
{
testclass objtestclass1 = new testclass();
testclass objtestclass2 = new testclass();
...
We're using StyleCop in our C# projects. In some cases we'd like to avoid the rules though. I know you can add // <auto-generated /> in the beginning of the file to make StyleCop ignore it. However, I don't want to ignore the rules for the whole file - only a block of code within it.
Can I disable StyleCop for specific lines somehow?
...
Hi!
I have an e-commerce website that is already up and running for some time. It's built on .NET 3.5. So far, so good.
The "problem" is that now I need to start sharing functionality (products list, order mechanics, customer information, etc) from this project with new projects and external vendors. Since I know the thing is gonna be ...
Hi,
I want to deploy a wpf client appllication, I need to allow the user to choose a directory for the install, eg. c:\program files\myapp. Unable to do this with clickonce, I need to use a setup project to deploy my app. How can I have the same update functionality as a ClicOnce app in my setup project? ie Have the app check an adddres...
I am currently researching the options that are available (both Open Source and Commercial) for developing a distributed application.
"A distributed system consists of multiple autonomous computers that communicate through a computer network." Wikipedia
The application is focused on distributing highly cpu intensive operations (as ...
Hi
Our company has pretty much banned us from using open-source libraries in our commercial products due to licensing issues. We are currently looking for a commercial .NET library that can read and parse CSV files - does anyone have any ideas ?
As far as functionality goes, I really need to be able to read a CSV file into a strongly ...