I am trying to interact with the windows command prompt from code. My goal is to display the prompt, put in some command, display the output, and repeat. But can't seem to get the first three working at the same time.
private void button2_Click(object sender, EventArgs e)
{
Process proc = new Process();
pro...
I have followed the Microsoft tutorial here to create a Crystal Report (with v12.0) within Visual Studio and attach it to a web form using a CrystalReportViewer, CrystalReportSource and SqlDataSource as I wish it to read data from my SQL Server instance. The report will load fine once (this appears to be snapshot data though saved embed...
How is the app.config binding in .Net?
Let's say if I have an application project referencing a class library project. The code ConfigurationManager.AppSettings["MySetting"] in the class library project will read the value from app.config from the application project. Is my understanding correct?
So how about if we have 2 class libra...
I have a my custom collection derived from List(.MyItem.)
I want to trace if my collection is modified, how can I do that?
I am able to track Add Remove operations etc...by implement new definition of them but I don't see any method in List that gives me opportunity to track if collection is modified...
...
Is there any Workaround/Tool for renaming the Resource Keys from the resource file .
I also need to replace all such occurences in the source code with my new (renamed resource key).
Is there any tool available to automate this task.?
Could someone put in some thoughts on this.?
thanks,
vijay
...
Hi,
I have a windows application in which I have a static PDF file(File1).
Another PDF file(File2) is created on the runtime.
I need to add the contents of the File1 to File2 as a new page of File2.
Is there a method in .Net to do this without using any external libraries or softwares.
Regards,
Abhishek Jain
...
I have a application where the validation is done in the web server side (in the page). and the control is passed to the sl client. The SL client makes call to the ado.net data services for its query and wcf service for writing to the DB.
How should I handle the security of the ado.net data services?
I use
http://programmerpayback.com/2...
when I do :
DataGridViewRow.Rows[index].Selected = true;
it however selects the row but the cursor(focus) is still pointing to the previous row..
When I manually enter in edit mode .. it highlights the cell of previous row..not on the row which done through coding..
However when I select the row through mouse then the cursor (focus) a...
Hi everyone.
Consider the following html code:
<div id='x'><div id='y'>Y content</div>X content</div>
I'd like to extract only the content of 'x'. However, its innerText property includes the content of 'y' as well. I tried iterating over its children and all properties but they only return the inner tags.
How can I access through th...
I would like to write the unit test for a text parser class but I am not sure about the Bad Inputs I need to give to the test method in order to be sure it work in all possible cases.
The method uses some regular expression plus string manipulation, but if I understood well the Unit Testing approach I don't have to concentrate on the me...
Hello everyone,
I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application.
My question is, if I am using Trusted_Connection=true with SQL Server authentication mode (not Windows authentication mode, i.e. using sa account and password in connection string in web.config), I am wonderin...
My business has a .NET web service (not WCF) hosted in IIS on a server which has four network interfaces. The service makes calls to an external web service, hosted by a third party.
In order to configure firewalls correctly internally and at the third party, we need to know which of the available IP addresses on the server the web ser...
Hi,
What encryption method does the .NET FormsAuthentication.Encrypt() method use?
There's no mention in the MSDN article:
http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.encrypt.aspx
Thanks.
...
I have a web application which extensively uses Windows Common Controls ActiveX controls for User Interface. These mainly include Listview, Treeview, Common Dialog etc. With these controls I get very good performance in load times and also these controls provides very good communication with JavaScript.
Recently I enabled supporting Un...
I've been seeing some odd behaviour with fractional pen widths, and I wonder if anyone can explain what's going on. Drawing a rectangle on a form in response to a Paint event:
private void Form1_Paint(object sender, PaintEventArgs e)
{
const float width = 1.996093F;
Rectangle rectangle = new Rectangle(10, 10, 20, 20);
using (Pen ...
Hi,
i've got a VS2008 asp.net mvc solution with the projects:
Common
Project_1
Project_2
The common project also contains an "images" folder with "common images" that should be used by both of the 2 projects...
How would i "link" to these folder from one of the projects now, when it should be available via a browser ( e.g. via a pa...
Hello everyone,
I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 + C# + ADO.Net to develop ASP.Net Web application.
My question is, if I am using Asynchronous Processing=true with SQL Server authentication mode (not Windows authentication mode, i.e. using sa account and password in connection string in web.config), I am won...
I know there are many other questions here regarding similiar situations, but I have been so far unable to find one that fixes my problem, hence this question.
I currently have a page that contains a form, and various fields (as you do) and validators. Some of the fields and validators are within an UpdatePanel as they may have to chang...
Hi all,
My first stackoverflow question, hurray to me.
I'm a .NET user, and my goal is as simple as finding the absolute path of the directory of my main executing assembly (the EXE file).
I have several candidates:
Assembly.GetExecutingAssembly().CodeBase
Assembly.GetExecutingAssembly().Location
AppDomain.CurrentDomain.BaseDirectory...
Hi
Is it possible to materialize (within the Entity Framework) Entities from a standard SQL Data Reader?
I am writing specific SQL that is passed to the server using EntityConnection.StoreConnection. Thsi returns a standard Data Reader containing rows should be materialized as Entities.
I suppose one workaround is to create a Entity-r...