all groups > c# > september 2004 > threads for tuesday september 28
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
XML Parsing in C#, Finding null string
Posted by GeRmIc at 9/28/2004 10:35:06 PM
How do you find if the returned XML string does not contain any
record/elements?
The XML string i receive just has the structure if there are not records,
How do I check for this?
<?xml version="1.0" encoding="UTF-8"?>
<array-list xsi:type="java:java.util.ArrayList"
xmlns:xsi="http://ww... more >>
Sending E-Mail Message
Posted by Dave at 9/28/2004 9:34:40 PM
Hello.
How can I send E-Mail message from my application in C#?
... more >>
"marker" interfaces. What are they good for?
Posted by Eran Kampf at 9/28/2004 9:25:46 PM
I was wondering why MS defined "marker" interfaces (empty interfaces) in the
..NET framework(interfaces such as such as INamingContainer,
IRequiresSessionState etc...).
Why not use attributes?
Eran Kampf
http://www.ekampf.com
... more >>
Delphi TStringList in C#?
Posted by NathanV at 9/28/2004 8:55:02 PM
Anyone familiar with Delphi know of a similar type to the TStringList in C#?
Thanks,
Nathan... more >>
Counting the number of records in a XML String
Posted by GeRmIc at 9/28/2004 8:45:03 PM
Hi,
I receive an XML string like
<record>
<value>...</value>
</record>
<record>
<value>...</value>
</record>....... etc.,
Now i want to find out how may records are there in that XML string, I do
not want to write anything to the drive is there any way to process that
string in... more >>
XML: "Par suplente no válido"
Posted by Jose at 9/28/2004 7:43:27 PM
Hola a todos:
Estoy intentando generar un fichero xml Unicode-16 simple, con algunos
elemento con atributo. El caso es que cuando el atributo es un string corto
me funciona, pero con strings muy largos me da este mensaje. Pienso que el
motivo puede ser algun caracter que termina alguna etiqueta.... more >>
Naming convention for const
Posted by Marco Solchio at 9/28/2004 7:16:53 PM
I'm coming from C++ world, where I've been using
#define SALSA 1
and
#define SALSA_DANCE "Salsa Dance"
in a header file to define my constants..., all uppercase and underscores.
Does the same naming convention apply in c#, or does .NET define its own
style?
e.g.
public class Constants
... more >>
WebRequest and ASP username/password form authentication
Posted by Tony at 9/28/2004 6:43:02 PM
Please help, I've scoured the web but cannot find an answer to this!
I want to use WebRequest to get the contents of a web page. The trouble is,
the page require you to go to a login page (using ASP - not ASP.NET), and
enter a username and password to get in.
How do I use WebRequest in thi... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
TreeView Control
Posted by abc at 9/28/2004 6:11:00 PM
Hello everyone,
I've a Tree Class which returns Directory Tree Structure, if physical path
is specified.
On every node selection i'm calling a javascript function to load the file
in a frame.
For e.g. node.NavigateURL="javascript:NodeFunction(' " + path + " ',' " +
FileName + " ')
NodeFun... more >>
Word 2003 Mailmerge question
Posted by Paul at 9/28/2004 5:46:46 PM
I've written a large C# app to instantiate Word 2003. Several tables are
created as well as a Merge Table containing data that is merged in
throughout the document.
I'd like to toss in some data into the document table via:
oWordDoc.Tables[1].Cell(5,4).Range.Text = wrdSelection.Range.Co... more >>
Error on accessing Win32_PerfFormattedData_PerfProc_Process
Posted by Christopher Attard at 9/28/2004 5:22:33 PM
Hi,
I'm writing a c# application which queries the WMI class =
"Win32_PerfFormattedData_PerfProc_Process" for IDProcess, VirtualBytes =
and WorkingSet for each running process. When I try to enumerate the =
ManagementObjects found in the reutrned collection, it is giving me a =
"Provi... more >>
Error go to static void Main()
Posted by byerkes NO[at]SPAM elexio-dot-com.no-spam.invalid at 9/28/2004 5:01:46 PM
In my application everytime I get an error instead of taking me to the
error it displays the error and takes me to static void Main() which
is the entry point for my application.
For example if I am debugging my code and I get to a line that errors
it doesn't just stay there it, hides the code... more >>
WMI Permissions (Remote Shutdown)
Posted by Lloyd Taylor at 9/28/2004 4:57:46 PM
Hello all,
I have written an application for monitring various network issues.
I am trying to implement a remote shutdown/reboot however everytime i try to
run this particualr program I get an exception with the message
Privilege not held.
I can succesfully run it as a Script but it always... more >>
annoying reproducable Bitmap.Save() crash
Posted by Sam Jost at 9/28/2004 4:53:59 PM
Bitmap.Save() does crash very often on Saving jpg's. It seems to dislike
pictures on a random basis, but when it dislikes a picture there is no way
around it.
Take for example the picture
http://home.foni.net/~sjost/fremd/IMGP5753-2.JPG
I load the picture, and save it rotated by 270 degre... more >>
Running an EXE from c#
Posted by Anant Raman at 9/28/2004 4:38:40 PM
Hi
I have an exe file on my machine. I need to launch this exe from the windows
service (written in c#) running on my machine. The service knows about the
path where the exe resides. How do I launch the exe from the service.
Any help will be highly appreciated.
Thanks
Anant
... more >>
Tray Icon
Posted by Thomas Bender at 9/28/2004 4:33:19 PM
Hi,
how can i start / run my programm as "Tray Icon" in C# ?
Thx, cya Thommy
... more >>
tinyint, Byte and byte
Posted by Wasim Akram at 9/28/2004 3:46:17 PM
Hi,
I have a field "Month" in my SQL server table. The type of this field is
"tinyint".
Now what I am doing in the code is using DataRow to read this field in a
'int' variable.
int month = (int) dataRow["Month"];
But the above line throws exception that the cast is invalid.
After... more >>
Looking for suggestions
Posted by jayderk at 9/28/2004 3:31:11 PM
Hello all,
I would like to be able to use something like MSN messenger to notify people
that an event occured.
an example of this would be a sales guy is out on the road and places an
order for one of his customers.
our server would send out a message via email and something like MSN
messe... more >>
html controls in webforms
Posted by GM at 9/28/2004 3:17:03 PM
Is it possible to access html controls from Webform controls?
thanks,
... more >>
OT: Cannot remove assemblies from GAC
Posted by Derrick at 9/28/2004 2:51:59 PM
I know this isn't C# specific, but I find this group to be the most helpful
I have installed a couple of assemblies into the GAC, via drag-and-drop into
the C:\WINNT\assembly "folder" (on Win2K). According to MSDN, this is
perfectly acceptable
(http://msdn.microsoft.com/library/default.asp?ur... more >>
Windows Forms, Data Grid, and Link Buttons
Posted by Paul Yanzick at 9/28/2004 2:46:44 PM
Hello,
I have a Windows form with a datagrid control, and would like one column to
appear as a hyperlink, so when clicking on it, it will open IE and go to the
web. Unfortunately, I cannot find an example. My code is below.
Essentially what I am trying to do is get a list of patches installe... more >>
compiling to GAC with VS.NET?
Posted by Lasse Edsvik at 9/28/2004 2:42:49 PM
Hello
I was wondering what's needed to do to do this in VS.NET?
http://www.123aspx.com/redir.aspx?res=29946
so i dont have to use that cmd-prompt :)
can i just change some compilesettings or something?
TIA
/Lasse
... more >>
Send file to recycle bin
Posted by Ben Bloom at 9/28/2004 2:37:20 PM
I want to send some files to the recycle bin after I'm done using them.
I'd rather not delete them or make my own aging scheme.
How do I go about this? I haven't been able to find a C# example out there.
Thanks.
--
to reply, remove .s.p.a.m. from email... more >>
Wait for user response on opened form
Posted by jsperry NO[at]SPAM cox-dot-net.no-spam.invalid at 9/28/2004 2:02:11 PM
I am writing a program that has a portion which downloads files into a
selected directory. It first checks to see if the file exists if the
file exists it opens another form with buttons related to
overwriting, renaming etc. What is the proper way in windows forms
programming to open a new for... more >>
Inherit from IDisposable - when?
Posted by Razzie at 9/28/2004 1:56:53 PM
Hey all,
When should or should you not inherit from the IDisposable interface for
your custom classes?
Say I have a custom class SomeClass that does... some stuff. If I create a
new instance of SomeClass and it goes out of scope, the GC will always clean
that up, right? So, why should I ... more >>
Serailizing Static Variables Problems
Posted by JackRazz at 9/28/2004 1:53:06 PM
I'm trying to serialize a class using the binary formatter without serializing the
'static pastFirstCall as Boolean' variable. Normally private (module-scope)
variables are serialized unless the <NonSerialized> attribute is used.
Public Function NextMessageNo() As Integer
<NonSeri... more >>
string question
Posted by J at 9/28/2004 1:47:36 PM
Hi, I have a simple string question in C#:
a VB.NET statement like this:
sb.Append(Chr(34) & myReader.GetValue(i).ToString & Chr(34) & vbCrLf)
So, for Chr(34) and vbCrLf, what I need to use in C#?
Thanks all.
J.... more >>
Concise loading of data into a hashtable ?
Posted by mark4asp at 9/28/2004 1:47:17 PM
Hello,
I am converting an app from JavaScript to ASP.NET
I have the following JavaScript 'associative array'. Is there a
concise way to create an analogous structure in .NET Framework using
c# or VB.NET? I don't want to use JScript.
consFin =
{2:'m',4:'n',6:'ng',8:'r',10:'l',12:'kh',14:'... more >>
Protected access for instance members
Posted by Nathan Wiegman at 9/28/2004 1:41:16 PM
Hi,
Why must derived classes access protected base members through an instance
of a derived class? The following code would work in C++, why doesn't it in
C#?
public class A
{
protected int x;
}
public class B: A
{
static void F(A a)
{
a.x = 1; // Generates compile e... more >>
How to find out a files encoding?
Posted by Paw Pedersen at 9/28/2004 1:34:41 PM
I'm reading from a file that sometime is saved as ANSI and sometimes is
saved as UTF-8
Because it has some danish characters like "æøå" in it, I have to read it
with "windows-1252" encoding if is saved as ANSI:
Encoding ediEncoding = Encoding.GetEncoding( "windows-1252" );
StreamReader stream... more >>
CreateObject("Excel.Application",MyServer)
Posted by KC at 9/28/2004 1:24:56 PM
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")
The call is from a asp.net (Intranet) application. \\Myserver is a network
computer in the same domain as web server. The only way I can get this call
worked is when I add the us... more >>
Nested Tables in Datagrid???
Posted by Darryn Ross at 9/28/2004 1:12:33 PM
Hi there...
I am trying to display both parent and child details in my datagrid at the
same time but i cannot seem to do it. It's either one or the other, if
anyone has any suggestions on how i can do this please let me know.
My current code to establish the relationship and display the data... more >>
Uploading to an area outside of the web server.
Posted by Marilyn at 9/28/2004 1:09:03 PM
Is it possible to upload files to a folder outside of the web server? I
realize that the IUSR account needs access to the area but since the IUSR is
not a domain user how can you give access if you want the file uploaded to an
area other than the web server? Is it that you can't?
thanks yo... more >>
use of unassigned local variable
Posted by Ropo at 9/28/2004 1:03:09 PM
Newbie:
I am writing code to read an xml file. I want two values from the document
so I want to save them as I am reading through the elements. I want to
reference them (using Console.WriteLine) after I complete the loop. When I
compile I get the "use of unassigned local variable".
What... more >>
Auto Execution Commands
Posted by Niraj Ranka at 9/28/2004 12:26:52 PM
Hello,
I am having a web site, which needs to perform some Tables Updations after a
fixed interval of time 10 mins....
Is their any way out to do this...
Thanx in advance
Niraj AR
... more >>
tabcontrol & its pages....
Posted by genc ymeri at 9/28/2004 12:01:44 PM
Hi,
I'm running in a strange "problem" .... I'm trying to hide a page in
tabcontrol with this command " tabMyPage.Hide();" but it still shows up. Am
I missing something ??
... more >>
Terminating a service when a worker thread terminates
Posted by tconti NO[at]SPAM hotmail.com at 9/28/2004 11:45:19 AM
Hello:
I created a basic windows service that polls a db and sends emails to
our subscribers. In the onstart method I create a new thread and send
it on its way to do work. It should never end unless told to do so by
the onexit event I implemented in the worker object. However there
are t... more >>
How to make a comboBox behave like a Label at runntime
Posted by chakachimp NO[at]SPAM yahoo.com at 9/28/2004 11:35:33 AM
I'm trying to make a combo box custom control (Windows Forms .NET 1.1
c#) that can behave like a label programatically at run time. This is
actually a strong feature request by our customers. I really don't
want to have to make a UserControl that has both a label and ComboBox
in it. I would rath... more >>
How to dynamically create a type?
Posted by Julia at 9/28/2004 11:25:25 AM
Hi,
I wonder can I dynamically create a type without knowing the exact assembly
in which he reside
but with knowing that his assembly is referenced in the project?
surely I can list(at rn time) all referenced dll and check for the type?
Is there a better way?
Thanks.
... more >>
VisualC# Standard Users?
Posted by Larry at 9/28/2004 11:10:04 AM
After installing VisualC# Standard, DX9 will not install the debugger. Any
other users of C# Standard have similar problems?
PS: I ran the complete VStudio .net trial for 60 days and DX9 installed
fine.
Larry P.
... more >>
.net conferences
Posted by Mark at 9/28/2004 10:50:39 AM
Could individuals please reply with links to upcoming .NET conferences? For
example, I believe I remember reading that there was going to be a .NET/SQL
Server conference in Las Vegas in November?
Thanks in advance.
Mark
... more >>
How to deserialize an object?
Posted by Julia at 9/28/2004 10:31:35 AM
Hi,
I know of course how to deserialize an object,but i wonder if i can
deserialize an object from two different XML
1.Do I need to create a formatter for each type of XML?
2.Should I only apply XSL to a different XML before deserialize?
3.Other ways?
More:
I have a Person class
and... more >>
Question about Attributes?
Posted by dlgproc at 9/28/2004 10:29:05 AM
Is there a way to get the type (through reflection) that applied the
attribute from within the attribute?
For example:
using System;
using System.Reflection;
using DlgProc.MyAttributeNamespace;
namespace DlgProc.MyAttributeNamespace
{
[AttributeUsage(AttributeTargets.Class, AllowMul... more >>
Comparing to DBNull
Posted by Michael Culley at 9/28/2004 10:26:43 AM
Which is better:
SomeValue is DBNull
or
SomeValue == DBNull.Value
Thanks,
Michael Culley
... more >>
A C# / SQL Query Problem
Posted by cemlouis NO[at]SPAM phreaker.net at 9/28/2004 10:15:19 AM
Hi,
I want to send to SQL server a query I want to get randomly generated
100 rows where they are no generated before. I made my query like
below:
mySqlCommand.CommandText = "SELECT name,rand(name) FROM people LIMIT
100 WHERE generated_before IS NULL";
Gives system error???
Thank you,... more >>
server blocks incoming request ???
Posted by () at 9/28/2004 10:07:58 AM
Hi,
I'm writing a small client-server application using sockets
Server code
IPAddress address = Dns.Resolve("localhost").AddressList[0];
TcpListener tcpl = new TcpListener(address, PORT);
Socket s = tcpl.AcceptSocket();
...
Client code :
TcpClient tcpc = new TcpClient("local... more >>
Web Browser Capability
Posted by Dougie at 9/28/2004 10:07:58 AM
Hi,
I've included the Active X control in my windows app for viewing a web page
via Internet Explorer. I want to include the browser so that it maximises
accordingly when I change the size of the application window. Does anyone
have any ideas?
I.e. I want to have a internet browser 100... more >>
passing data from MDI child in .NET
Posted by Tim Wallace at 9/28/2004 9:46:16 AM
noob alert...
I have an application using c# that uses MDI. On some of the child windows,
I need to open a dialog that will communicate back with the MDI child. I
did not see any clear way to accomplich that in the documentation. Can
anyone point me toward an example or better documentation... more >>
what kind of ipc technologies for C# windows form applications.
Posted by Bredal Jensen at 9/28/2004 9:29:01 AM
I know you can use socket to talk to other application . But i have an old
;) MFC app that only
speaks "wm_copydata". I want this appliccation to interact with an other one
written with C#.
Well "web services" are out of question because i do not know if my old MFC
centrique app need
to be... more >>
Interesting problem!! its urgent!!!!
Posted by sunnyz NO[at]SPAM lycos-dot-com.no-spam.invalid at 9/28/2004 9:01:36 AM
Hi
I've a windows application in C#.At a particular point , i have four
clones of the same form running and i want that application should
not end till all the forms are closed.
The problem is the first form that runs when its closed closes all
other forms and the application.
plz help me i... more >>
Socket problem
Posted by Jason Hurder at 9/28/2004 8:46:21 AM
Hi folks,
I am writing a small network application that uses TCP sockets. My
application is the accepts connections via the AcceptConnection function
of a server socket and creates a client socket from it. My question is,
if someone disconnects from my server, how can I detect this? Checkin... more >>
Extending an enumeration class
Posted by Barguast at 9/28/2004 8:29:03 AM
This is a trivial problem, but I'm just looking for a nice way to do it,
that's all :)
I've got an enumeration which enumerates a number of different text
encodings, for example:
public enum TextEncoding
{
ASCII,
Unicode,
UTF8,
}
I've been trying to find a nice way of getting ... more >>
c# complier options from inside IDE???
Posted by paul_500 NO[at]SPAM hotmail.com at 9/28/2004 8:26:21 AM
Hi
Does anyone know how to specify a compiler option (/r) from inside the
..NET IDE? I'm calling a COM object, I've alreay registered the type
library and now have to compile with /r:TypeLibname.dll. Any ideas on
how to do this from within Visual Studio? (please no command line
suggestions)... more >>
using webpermissions
Posted by (cmrchs NO[at]SPAM yahoo.com) at 9/28/2004 7:12:06 AM
Hi,
I created some WebPermissions :
Regex myRegex = new Regex(@"http://www.linux.org/");
WebPermission myWebPermission = new WebPermission(NetworkAccess.Connect,myRegex);
string URL2 = "http://www.microsoft.com/";
myWebPermission.AddPermission(NetworkAccess.Connect,URL2);
But what do... more >>
how to get a @@identity scope
Posted by stefanljungstedt NO[at]SPAM hotmail.com at 9/28/2004 7:00:36 AM
how do I get the result from a sp who throw a SCOPE_IDENTITY in result?
exampel
Public void SpInsert(Team team)
{
sqlconn cn......
sqlCommand sqlC....
sqlC.parameters....
cn.open
sqlC.??
sp
create procedure InsertClub
{
@TeamName varchar(30)
}
as
insert into Club([TeamName])Val... more >>
connect to ftp-server
Posted by (cmrchs NO[at]SPAM yahoo.com) at 9/28/2004 6:52:12 AM
Hi,
how do I connect to an ftp-server using System.Net classes ?
I know how it works for http :
string myURL = "http://localhost/MySite/mypage.html";
WebRequest wReq = WebRequest.Create(myURL);
but if I try
string myURL = "ftp://ftp.clubic.com/"
WebRequest wReq = WebRequest.C... more >>
how to call an ascx control ID from .cs file
Posted by Suriya at 9/28/2004 5:53:05 AM
Hi,
I have a lable control placed on an .ascx( let say that its ID = "myLable",
now I want to pass a text message to that "myLable" lable from myclass.cs. I
want to display this lable message in aspx by registering the ascx. How to
do the same, pls suggest. pls help with an example.
tha... more >>
Classes concepts
Posted by Josema at 9/28/2004 5:13:02 AM
Hi to all,
actually im a newbie in the OOP and i would like to know if this way of
using clases its a best way (logical, and a good way)
Lets imagine that i have a data base with departments (depid, depname)
if i make the class
public class department
{
private int id;
p... more >>
String Manipulation Alternatives to RegEx
Posted by Tom at 9/28/2004 4:53:02 AM
I have string that is 2.5 million bytes long.
I tried using Regular Expressions to look for patterns and replace the
pattern found with a pre-defined text. This works great on some computers
but on some others (win 2K server 1gig of ram) it times out!
So I am looking for an alternative me... more >>
Big problem with converting byte to char data
Posted by James Dean at 9/28/2004 3:41:10 AM
i want to decode 2 byte and 1 byte char data......because japanese
characters take up 2 bytes ordinary characters 1 byte.....can u convert
one byte array so that the 2 byte and 1 byte information is displayed
correctly......if not how will i do it byte by byte.......
*** Sent via Developer... more >>
c# OpenFileDialog problem
Posted by sonia NO[at]SPAM mer.co.il at 9/28/2004 2:54:44 AM
Hi.
I use in my windows c# project External
Dlls(Assembly.LoadFrom(dllName);...).
All work fine.
I add to one of my forms using of OpenFileDialog. First time I call
this form
It works. Next times I get Error: "File or assembly name Extended.dll,
or one of its dependencies, was not found." in ... more >>
doubles and floats
Posted by Mike P at 9/28/2004 2:11:12 AM
Why does this cause the error 'cannot implicitly convert type 'double'
to 'float'? Can you not multiply doubles by floats without converting
them all to the same datatype?
fltPCRateStd = fltPCRateStd * 1.175;
Regards,
Mike
*** Sent via Developersdex http://www.developersdex.com ... more >>
Problems in database query timing out
Posted by Bonj at 9/28/2004 1:53:02 AM
When I am in a database project in VS.NET 2003 EA, using the Run Stored
Procedure option times out even though the timeout option in Tools, Options,
Database Tools is not checked.
Anybody else experienced this?... more >>
|