I created a WebService using the .NET 2.0 framework, a class based on an interface that has the WebServiceAttribute and hosting it using IIS and a ASMX file. The WebService currently loads its configuration from one XML file.
I'd like to create multiple instance of this service where each loads it own configuration.
By coping the ASMX ...
I know Environment.TickCount exist but I have a big problem with that, it's limited to 25 days.
what would be a good alternative that require no external module/dll and would work in a vanilla install of windows server 2003?
thanks
...
Our code library needs to be notified when the application is exiting. So we have subscribed to the System.Window.Forms.Application.ApplicationExit event. This works nicely for Winforms apps, but does it also work for other types of applications such as console apps, services, and web apps (such as ASP.NET)? The namespace would suggest...
This works just fine:
protected void txtTest_Load(object sender, EventArgs e)
{
if (sender is TextBox) {...}
}
is there a way to check if sender is NOT a TextBox, some kind of an equivalent of != for "is"?
Please, don't suggest moving the logic to ELSE{} :)
thank you.
I knew it had to be easy :)
...
I'm looking for a class/API that allows you to create and manipulate RichText strings (rtf format) for use with the RichTextbox -like controls.
I'm thinking of something like StringBuilder, but that also allows you to specify formatting as you append to it and also go back and edit previously appended segments, as well as doing string...
I have a datagrid which is populated with CSV data when the user drag/drops a file onto it. Is it possible to display a message in the blank grid for example "Please drag a file here" or "This grid is currently empty". The grid currently displays as a dark grey box as I wait until the file is dragged to setup the columns etc.
...
I have a (managed/unmanaged C++) winforms app that links to a static library. That library links to another static library. When I do a Rebuild on the Winforms project, Visual Studio 2005 attempts to rebuild the references static library, but does not rebuild deeper than one level. This causes me to have to manually rebuild the leaf proj...
I have a asp:BoundColumn with DateTime? data (i'll call it column X) in the asp:GridView. I loop through all the rows in the grid, and cast the .Text property to column X to DateTime (i need this to do some checking and change the cell background color if needed).
I have 2 options:
wrap the cast in try/catch ... handle FormatException...
I'm using CollapsiblePanelExtender from AjaxControlToolkit, it works fine when i click on it, but it won't expand all the way on the initial page load (expands about 90%).
I have to collapse it and expand it back manually for it to open up all the way.
I don't have the ExpandedSize property set, because the panel content is dynamic.
...
Currently I'm looking at a problem with web references in vs2005 .net
I have multiple web applications with multiple dynamic web references, now in the web.config I see the following code:
<applicationSettings>
<MainWeb.Properties.Settings>
<setting name="MainWeb_localhost_WebService" serializeAs="String">
<valu...
Is it somehow possible to use the XmlSerializer to deserialize its data into an existing instance of a class rather than into a new one?
This would be helpful in two cases:
Easily merge two XML files into one object instance.
Let object constructer itself be the one who is loading its data from the XML file.
If the is not possible b...
I've created the default WCF Service in VS2008. It's called "Service1"
public class Service1 : IService1
{
public string GetData( int value )
{
return string.Format("You entered: {0}", value);
}
public CompositeType GetDataUsingDataContract( CompositeType composite )
{
if ( composite.BoolValue )
...
Anybody purchased/used a DataGrid/GridView control that allows Collapsing/Expanding Parent-Child relationships?
The standard DataGrid control, which I am using in .NET 2.0, seems to have limited capabilities with regards to this functionality. The newer GridView control doesn't support this at all to my knowledge.
I was thinking ab...
I have a set of pdf files stored in the location accessible only by the application - so those files cannot be accessed directly via http.
The file paths are stored by the database and when the user is given the option to download a file the code as below is being executed:
Response.ContentType = "Application/pdf"
Response.AppendHead...
Hi,
I have 'extended' the System.DateTime struct by adding some essential fields to it. Ideally I'd like to be able to deliver this object via a webservice to a winforms client.
I've marked the stuct type as [Serializable] and it also implments ISerializable, however if I inspect the XML being delivered by the webservice it simply con...
I am rendering data using Repeater control.
Let's say there are 2 fields in the data source: productName and ProductID
In the following code:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li>
<%#Eval("productName")%> <br/>
<asp:HyperLink ID="lnkDetails...
namespace X{ public static class URLs
{
public static TabController tabIdLookUp = new TabController();
public static string DASHBOARD_AUDIT_PAGE = tabIdLookUp.GetTabByName("View My Safety", 2).TabID.ToString();
public static string URL_GENERATE_WITH_MID(String TabName, int PortalId){ {
return tabIdLookUp.GetTa...
I've got the setup below. When I click the 'Edit' link on the CommandField, a RowEditing event gets fired, but the row does not allow me to edit; specifically, the DropDownList does not appear.
My code seems to conform to all the examples I can find.
I'm probably missing something very basic, as I seem to be the only person on the inte...
Hi friends,
This is different problem for me. I used ASP.NET2.0 with AJAX,C#.
Regularly client make request from HTML (client side) to any class(.cs) file(server side). And then make updation on that class files through Object or in database.
But I want to make request from Class file (server side) to HTML file (client side) based on ...
Morning all,
How would I go about getting the serial number of the storage/sd card on my mobile device? I am using C#.Net 2.0 on the Compact Framework V2.0.
Thanks.
...