|
Im not sure but i would say it would be both
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi all,
How to write a xml file into Remote URL using its NetWorkCredentials(userid & password) ?
Please suggest me.
Thanks in advance
cheers
kvsekhar
|
|
|
|
|
So... you want to upload a file to a server? you could create an FTP for the server
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Thanks for your suggestion.
Is it not possible using DataSet.WriteXml(url) ?
because I could able to read xml file from url by following code
XmlUrlResolver resolver = new XmlUrlResolver();<br />
NetworkCredential nc = new NetworkCredential("id", "pwd");<br />
resolver.Credentials = nc;<br />
<br />
Uri myUri = new Uri("http://domain/Assessments/Expenses.xml");<br />
Stream s = (Stream)resolver.GetEntity(myUri, null, typeof(Stream));<br />
<br />
XmlTextReader xmlTextReader = new XmlTextReader(s);<br />
<br />
XmlDataDocument xdoc1 = new XmlDataDocument();<br />
xdoc1.DataSet.ReadXml(xmlTextReader, XmlReadMode.Auto);<br />
<br />
DataSet ds = xdoc1.DataSet;
How this logic will be applied for Writing XML to URL ?
|
|
|
|
|
im not sure if it is possible to write to a file like you are suggesting, and if it was possible it would more than likely require permissions to be set on the server for that kind of write access.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
I'm trying to copy a URL to clipboard by using following code
Clipboard.SetText("http://somewhere.com" ,TextDataFormat.Html );
But nothing comes out, essentially i want to copy a URL and when i paste to Word or some place it should come out with Blue underlined i.e it should be a link.
Thanks in advance....
|
|
|
|
|
after a brief test it would appear that word expects a paste to be in the format of 'Text' so it will paste only the last 'Text' object on the clipboard. Setting the TextDataFormat to Html will therefore not paste into word. If you change it to text it will paste into word and word will auto handle the fact that it is a link when you hit 'enter'.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Your URL is not a HTML link. Try
Clipboard.SetText("<a href=\"http://somewhere.com\">http://somewhere.com</a>" ,TextDataFormat.Html);
|
|
|
|
|
Hi, I had small application of BHO, through which I can retrieve the PDF files from cache using DocumentComplete and NavigateComplete2 Events of webbrowser. To get the PDF filepath, I used a filter of following:
http://theagussantoso.blogspot.com/2008/11/get-temporary-internet-explorer-files.html
The url can be obtained from the parameters of respective events.
but when I had retrived the PDF file copy through the filter present in above link, I was unable to get the URL through the events.
How can I get the copy of the pdf file when it is opened on IE?
|
|
|
|
|
why dont you check one of your many other posts on the subject? If you didnt get an answer in them, then dont repost. Go work it out for yourself.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
get the .pdf url using this
http://www.omegacoder.com/?p=63
and download anywhere you want...
|
|
|
|
|
Hi Export
Pls Help Me I am Making dll and User Control in C#.NET.
i Want That My Dll and USer Control Not Used By Another Person.
|
|
|
|
|
Pretty much impossible with .net I'm afraid. Google for obfuscation and get your wallet out.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I have an application where I am redrawing some images after each second. For this I have written a handler for timer in which i am calling one function which draws image. In timer i am incrementing number and based on the number i am displaying or redrawing image. In OnPaint event these images get displayed. But when I am trying to do this with timer event handler iam unable to display different image. I need to do ALT + Tab and again select the same application then my OnPaint gets called and whaever value of number the same image is get displayed. I want this to automatically displayed in sync with timer. What could be the reason.
|
|
|
|
|
Supra2 wrote: What could be the reason.
You are not calling Invalidate()[^] method. It will redraw the control.
|
|
|
|
|
Hi
I used the following code for listing files
int h=listBox1.SelectedIndex;
if(h==0)
{
try
{
reader = new XmlTextReader("path.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Text:
String s1;
s1 = reader.Value;
String ss;
ss = listBox1.SelectedItem.ToString();
sss = ss + s1;
object o3 = (object)sss;
DirectoryInfo dire = new DirectoryInfo(sss);
if (dire.Exists)
{
String[] folder;
folder = Directory.GetDirectories(sss);
foreach (string foldername in folder)
{
DirectoryInfo di = new DirectoryInfo(foldername);
if (di.Exists)
{
String[] files;
files = Directory.GetFiles(foldername, "*.exe*");
foreach (String filename in files)
{
lvi = new ListViewItem();
lvi.Text = filename;
listView1.Items.Add(lvi);
lvsi = new ListViewItem.ListViewSubItem();
lvsi.Text = filename.Length.ToString();
lvi.SubItems.Add(lvsi);
}
this.Controls.Add(listView1);
}
}
}
break;
}
}
}
catch (System.Exception err)
{
MessageBox.Show("Error: " + err.Message);
}
}
if(h==1)
{
} The following line gets the selected item from listbox(C:\,D:\...)
ss = listBox1.SelectedItem.ToString(); It works for C:\.When D:\ is selected it again displays C:\ and not D:\
|
|
|
|
|
I think you need to re-think you design. And please use more descriptive variable names. and h can never be both 0 and 1, so your two if statements need to be and else if, or a swicth, or even better get rid of them completely as you never use h in your code so its value has no matter in the output you get.
I am assuming you have a list box with two entries. One c:/ and one d:/, correct? if so then ss (which i assume is getting the drive letter) is not working as you expect, try debuging it with a writeline or messagebox showing its value. if you can confirm this then you can move to the problem being else where.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
itemcode and price are the fields in the table and i use sqldatareader to retreive data, when trying to do this using datareader.getstring(0) it works , but when call datareader.getfloat(1) it gives the exception Specified cast is not valid. i store the price as a float;
what might be the problem
|
|
|
|
|
either the column its referencing is not a float like you say, or your trying to assign a float to a different data type that does not support a cast from a float. does it compile? if not, lets see some code. If it does compile then try debuging by printing the value of the 'float' column as a string and see what value you get, just to check you have the right column
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I had the same problem just last week. Try 'getdouble(1)' instead. It worked for me even though the database type is a float.
-NP
Never underestimate the creativity of the end-user.
|
|
|
|
|
Hello everyone,
I want to programtically play a remote (streamed) video using C#, the purpose is to test web sites performance/stress. No need to have any GUI, just using Media Player API to playback a speific video by URL is fine.
I searched for Windows Media Player API/SDK samples, but all are dealing with GUI, not what I wanted. Does anyone have any good samples to recommend?
thanks in advance,
George
|
|
|
|
|
Well surely if the GUI examples do what you want you can take the relavnt code from them and use it however you want
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi musefan,
All samples I found are too complex and it takes me much time to read and just get simple code to playback. Do you have any recommended simple samples?
regards,
George
|
|
|
|
|
No I dont have any simple samples. Thankfully not all tasks can be accomplished with a single (or very few) lines of code.
Sometimes you have to write alot of code for something that may produce an apparently simple result. If you are having trouble understanding the complexity of the code examples than perhaps you need to take a step back and ask yourself if your doing something that is more advanced than you can handle. If so, then you will want to go back to more simple tasks until you have a better understanding. Or you could just put the time in to understand the example code you already have a learn from that. it really depends on how basic your understanding of the example is or is not.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Could you recommend me some samples to start-with? Either simple or not is fine.
regards,
George
|
|
|
|