I m trying to invoke a URL in C#, I am just interested in invoking, and dont care about response. When i have the following, does it mean that I m invoking the URL?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
...
I have a .NET solution with an installer project that generates an MSI. One of the projects installed by the MSI contains an App.Config file. It appears that the values of that config file are embedded into the MSI at compile time. Is there a way to override them at runtime?
For instance, the App.Config I'm working with sets the URL of ...
When using stored procedures I am able to add default values to parameters, for example:
@name varchar(50) = NULL
Is is possible to do something similar when using a parameterized query in .NET.
Thanks
...
I have a web service that returns a simple object:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.4927")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="urn:CHA...
Right now, I'm trying to separate out a set of constantly changing classes into their own dll and dynamically load them using MEF. My problem is that whenever I try and overwrite the dll while the app is running, it says it's in use.
Is there anyway to configure MEF to let me overwrite the dll and pick up the changes while the app is ...
Why we need the new in the select statement on one of them?
var runs = from sampleDataTable in db.SampleData
from sampleInfoTable in db.SampleInfo
where sampleDataTable.SampleInfo.SampleInfoId == sampleInfoTable.SampleInfoId
select new {sampleDataTable.Timestamp, sampleDataTable.SampleDataId, sampleInf...
I just want to find out if there's a good implementation (in C#/ASP.NET) on how to access my records from my different databases simultaneously. I have this simple application which suppose to search on these databases, then, display the record if a certain keyword is matched.
I have like 5 databases (currently using MySQL) all in all a...
Does anyone know about a good way to accomplish this task?
Currently i'm doing it more ore less this way, but i'm feeling someway unhappy with this code, unable to say what i could immediately improve.
So if anyone has a smarter way of doing this job i would be happy to know.
private bool Check(List<MyItem> list)
{
bool result = t...
What is the best way to access the cells that provide the data to a chart in Excel 2007 (using .Net).
...
I have written code to TryParse enum either by value or by its name as shown below. How can I extend this code to include parsing enums with Flags attribute?
public static bool TryParse<T>(this T enum_type, object value, out T result)
where T : struct
{
return enum_type.TryParse<T>(value,...
Hi All,
I am facing a weird problem in Testing server while using applet (using embed tag) in my ASP.NET MVC application Applet works fine locally in both browsers IE and Firefox but when deployed to Testing server its throwing below exception for Firefox only (IE works fine).
Please help me out in this
basic: exception: javax.xml....
As I understand it, TcpListener will queue connections once you call Start(). Each time you call AcceptTcpClient (or BeginAcceptTcpClient), it will dequeue one item from the queue.
If we load test our TcpListener app by sending 1,000 connections to it at once, the queue builds far faster than we can clear it, leading (eventually) to tim...
I have seen the Tuple introduced in .Net 4 but I am not able to imagine where can be it be used. We can always make a Custom class or Struct.
Edit: I am looking for an example which can also be considered inside the bracket of best practices.
...
Is there any way to do this?
Update: Sorry, I should have included more information. I am trying to create and connect to a SQL CE database using System.Data.SqlServerCe in C# running on a PC (i.e. not running on a Windows Mobile device).
This code:
string connstr = "Data Source=\"" +
filename + "\";Persist Security Info=False;...
I am serializing a generic dictionary in VB.net and I am very surprised that it is about 1.3kb with a single item. Am I doing something wrong, or is there something else I should be doing? I have a large number of dictionaries and it is killing me to send them all across the wire. The code I use for serialization is
Dim diction...
using System;
using System.Reflection;
namespace A
{
interface IObjectWithId<TId>
{
TId Id { get; }
}
interface IEntityBase : IObjectWithId<object>
{
new object Id { get; }
}
abstract class BusinessObject<TId> : IObjectWithId<TId>
{
public abstract TId Id { get; }
}
class EntityBase : BusinessObject<objec...
Currently I am facing the tedious problem of exporting complete GridView data to the pdf file so that the user can save it. I am using C# as the language in Asp.net 3.5. Kindly guide me.
The gridview contains only text values.
Thanks in advance.
...
After all the answers to my last question about fine-tuning turned out to be more useful than I expected, I thought that I would ask another similar Question about the MembershipProviders as well.
Okay, so firstly, to clarify: I know what a Membership, Role, and Profile provider is, how to implement my own, and how to configure them, an...
I am using VS2008. I have a project, SystemSoftware project, connect with a database and we are using L2E. I have a RuntimeInfo class which contains some shared information there. It looks like this:
public class RuntimeInfo
{
public const int PWD_ExpireDays = 30;
private static RuntimeInfo thisObj = new RuntimeInfo...
I am using GeckoFX version 1.9.1.0 with C#.NET. I have a placed a GeckoWebBrowser Component (geckoWebBrowser1) and a Button (button1) in a form and have navigated the browser to a page. Some text in the page can be selected. This text is composed of one or more DOM elements.
When button1 is clicked, I want to retrieve the DOM elements th...