|
how can i tell how many times axWebBrowser1_TitleChange will b called when im browsing to a site with axWebbroswer?
cause i want 2 retrive the title of the site... and some sites cause the event 2 occur different amounts of times...
or is there other simpler way 2 get the site Title without using axWebBrowser?
|
|
|
|
|
hi,
plz help me
i want some example programs on accessing the xml file in C#.Net2003
thanks for reading ,
GPK
|
|
|
|
|
u can use dataset to read ur xml file
DataSet ds = new DataSet();
ds.ReadXml("complete path of ur xml file");
by this way u will get xml file data in the form of table in dataset.
conditionaly u have defined the tags of ur xml file properly.
rahul
|
|
|
|
|
Hi,
If you want to load xml from an external file, just use the XmlDocument class Load method. Then you can use the XmlNode and all other classes to navigate through the xml content. You can get plenty of examples on msdn about this.
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
|
|
Hi,
The best way to access an XML file is to use XmlDocument. Something like:
<br />
XmlDocument doc = new XmlDocument();<br />
doc.Load("file.xml");<br />
XmlNodeList list = doc.DocumentElement.ChildNodes;<br />
foreach(XmlNode node in list)<br />
{<br />
string name = node.Name;<br />
string value = node.InnerText;<br />
bool hasChildNodes = node.HasChildNodes;<br />
}<br />
If an XmlNode has child nodes you can use ChildNodes property to obtain an XmlNodeList of these childs and so on...
Hope it helps
Do your best to be the best
|
|
|
|
|
Hi,
I thought that the following code would allow my application to accept Arabic input.
----
try
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("ar-IQ");
}
catch (Exception ex)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
----
But it's not the case, I still see garbage when I enter Arabic text in a textbox. I want my application to behave like notepad does, i.e. just by changing the input language (the language selector in the taskbar), the proper text is displayed in a textbox, no matter the language selected (Arabic, Greek, etc.)
In the world of Visual Studio 6, the way I made this work was to change the character set of every control in my application (e.g. to display arabic, each control's font.charset would be set to 178). I thought C# in Visual Studio 2005 would be smarter and easier than that, am I wrong? What do I need to do?
Thanks.
|
|
|
|
|
Hi,
You do not necessarily have to change the current culture in order to support characters from different datasets. .NET deals with all characters internally as UNICODE (at least that is my understanding). What you do need to do however is ensure that the font you are using in your forms can handle those different characters.
For instance on my local machine the Arial font can display chinese characters, but Times New Roman cannot. If I set the forms font property to Arial I will see the correct chinese symbols, but as soon as I change the forms font property to Times New Roman or some other font that doesn't support the characters, they are displayed as little squares or question marks.
Good luck,
Sean.
|
|
|
|
|
It is a C# app and uses XmlSerialization.
My app gets users input in a html TextBox in a webapp. If user enters a text like "10 < 20" in the TextBox then because of HTML post back, the text is escaped to "10 < 20". So the codebehind receives "10 < 20" as the text from the TExtBox.
I have to futher send this text to a service so this value is set in a class like
class a
{
string userComments;
}
When this class is serialized to send the XML to the service "10 < 20" becomes "10 < 20".
So because of this situation "<" has been double escaped(escaped twice). How can I Avoid second escape during seriaization?
Manoj Gautam
-- modified at 12:29 Wednesday 30th August, 2006
|
|
|
|
|
Hi,
how do I supply my own taskbar toolbars (those like quicklaunch, the iTunes-Toolbar, etc.) in C#. I've already searched Google and some Coding-sites, but I can't find anything on that topic, only on Appbars (behaviour similar to the taskbar, but not integrated into taskbar) or on systray-icons (I already know how to do that, I need more space).
For those who do not exactly know what I mean: There was (and probably still is) a small program for ThinkPad-users which will display a small battery next to your systray which will show the status of your laptop-battery. That is more-or-less the direction into I want to go.
Thanks in advance...
Xperimental
|
|
|
|
|
Hello,
how can I debug a DLL written in C# that is used by a compiled application at runtime? I can't debug the application iself, its code is proprietary.
Thanks much,
Michal
|
|
|
|
|
|
|
Seems like it's not possible to debug a DLL attached to the compiled application in Visual Studio Express
http://msdn2.microsoft.com/en-us/library/c6wf8e4z.aspx
|
|
|
|
|
Hello all happy programmers out there.
Iam currently working on a new Windows Mobile 5.0 Pocket Pc project.
Using SQL mobile database and the compaqt framwork 2.0
This will work as a customer database. Writing and reading works fine frome the database now. But i would like to transfer the data from the database to an excel document and if possible also from exel document to the database.
Any help is highly welcome.
Have a nice day !
|
|
|
|
|
You have to supply all the files in the project in the same command line. You can't compile each file seperately and expect it to work.
Beyond that, we'll need to see the command line your giving and the error that's generated.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The question is quite simple (but I could not find the best answer myself): What is the best C# way to transfer a file from a Desktop application (Windows Application) to a Server for persistance?
Persisting information about a windows form is ok, but how about persisting it somewhere else on the web?
Regards,
Vini
|
|
|
|
|
Marcos Accioly wrote: What is the best C# way to transfer a file from a Desktop application (Windows Application) to a Server for persistance?
File.Copy ???
Or do you mean positng the file via a WebService? The title of this post doesn't seem to fit the contents.
only two letters away from being an asset
|
|
|
|
|
Sorry Mark for being confusing.
All I wanna do is to copy, from my windows app, a bunch of configuration in an xml file to a remote server. Doesn't need necessarily be via web services.
Does File.Copy accept and ftp address or something similar?
Cheers!
Vini
|
|
|
|
|
It will accept UNC paths. 2.0 has the WebRequestMethods.Ftp class
only two letters away from being an asset
|
|
|
|
|
I am attempting to write a function with the following declaration:
void OpenExcel(string filename, out Excel.ApplicationClass XLApp, out Excel.Workbook XLWorkBook, out Excel.Sheets XLSheets, out Excel.Worksheet XLWorkSheet)
where the function will open an instance of excel and the workbook with the given filename, and assign the application instance, the workbook, the worksheets collection and the default worksheet to the variables passed in respectively
When I attempt to compile I receive the following errors:
Argument '2': cannot convert from 'Microsoft.Office.Interop.Excel.Application' to 'out Microsoft.Office.Interop.Excel.ApplicationClass'
Argument '3': cannot convert from 'Microsoft.Office.Interop.Excel.Workbook' to 'out Microsoft.Office.Interop.Excel.Workbook'
Argument '4': cannot convert from 'Microsoft.Office.Interop.Excel.Sheets' to 'out Microsoft.Office.Interop.Excel.Worksheets'
Argument '5': cannot convert from 'Microsoft.Office.Interop.Excel.Worksheet' to 'out Microsoft.Office.Interop.Excel.Worksheet'
This also fails when I replace "out" with "ref"
Anyone know how to fix this?
|
|
|
|
|
Aren't you missing the "out" modifier in the calling function?
[]'s
Vini
|
|
|
|
|
Whoops, I'm amazed that I missed that
|
|
|
|
|
i am now working in a web developing project and bind the web page with sql server.
my question is: I want to handle the tricks that may cause any crash in sql when a user type "slash" or anything like this or any equation make the sql accept what he wrote
thanks in advance.
haitham
|
|
|
|