|
Thanks,
However this only downloads to the server from the web site running on the same server...
(ie: I added the code to an aspx.cs page on my web site ran the code in the browser from another desktop machine and a file was successfully downloaded from the website on the server to a directory on the server)
However what I am looking to do is copy the file from the server directory to a directory on the client(or desktop where I am running the browser).
I assume I need to use ActiveX to get access rights to the local machine - however I have so far not found a good example or sufficient information on doing this with C#/Visual Studio 2005.
Thanks again.
Any further help/advice/suggestions much appreciated.
Regards Andrew
|
|
|
|
|
Hello,
I have a connection string that is stored in a database, the string is as follows:
"Server=TOIMISTO\\SQLEXPRESS;Database=ValkyriaDB;Trusted_Connection=True;"
Now if i open an connection using this string it works properly if hardcoded, but if i read it from database i get an exception, the reason is that the string gets the form where // is replaced by //// for some reason:
"Server=TOIMISTO\\\\SQLEXPRESS;Database=ValkyriaDB;Trusted_Connection=True;"
and offcourse the SQL databse throws exception.
I tried to replace "\\\\" with "\\" but i did not succeed with
String.Replace("\\\\", "\\");
EDIT: i did get the replace to work (and also the connection) but i still wonder if there is a better solution and what causes it.
Could somebody help me to solve this problem? It is quit annoying and i would apreciate if somebody told me the reason also...
Johan
-- modified at 5:47 Wednesday 14th June, 2006
|
|
|
|
|
Simple answer: Don't put a second '\' in the database string. This is only needed when you hardcode the string. When typing "\\" the actual string crated is only "\". The fact that you need two of them is just to tell the compiler what you are actually meaning. Instead of this you could also write @"Server=TOIMISTO\SQLEXPRESS;Database=ValkyriaDB;Trusted_Connection=True;". The @ tells the compiler that backslashes within the whole string are not treated specially.
|
|
|
|
|
hi
i wrote this code :
DataRow objDataRow = ds.Tables[0].Rows[i];
then my question is how to convert the objDataRow to array of string
thank you all
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: DataRow objDataRow = ds.Tables[0].Rows[i];
then my question is how to convert the objDataRow to array of string
object[] itemArray = objDataRow.ItemArray;
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
-- modified at 5:24 Wednesday 14th June, 2006
|
|
|
|
|
thank you but i want it exactly array of string
i don't want to go throught a loop to convert it to array
of string
thank you again
Tamimi - Code
|
|
|
|
|
string[] str = new string[ds.Tables[0].Columns.count];
rahul
|
|
|
|
|
thank you..
but i want to convert DataRow to array of string
without a loop
Tamimi - Code
|
|
|
|
|
do u want to store datarow's column's value in array of string or what????
rahul
|
|
|
|
|
i have multi colunm list view and i want to fill it
with the data inside the datarows.. so
for(int i=0; i
|
|
|
|
|
u can try
string[] str = new string[Dset.Tables[0].Columns.Count-1];
for(int i=0;i<=str.Length;i++)
{
str[i] = objDataRow[i].ToString();
}
for(int i=0; i < ds.Tables[0].Rows.Count ; i++)
{
ListViewItem listItem = new ListViewItem(str);
listView1.Items.Add(listItem);
}
rahul
|
|
|
|
|
thanks for you time
Tamimi - Code
|
|
|
|
|
That is not possible. The class has no method to convert the values to strings and put in an array. You have to use a loop.
---
b { font-weight: normal; }
|
|
|
|
|
i thought its possible !! because you can convert it
to array of objects (datarow.itemarray)..
anyway i did it with a loop
thanks for the note
Tamimi - Code
|
|
|
|
|
Tamimi - Code wrote: i thought its possible !! because you can convert it
to array of objects (datarow.itemarray)..
That is different, as getting the data as an array of objects doesn't change the data type of the items, it just puts the items in a different data structure. To get an array of strings you have to convert each value to a string.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All ,
I have a registration form in which i need to check whether the email provided by the user exist in the db. I have couple of code for doing this using AJAX, but the code is not working in Netscape and other non IE browsers.
Please help.
Thanks,
Joe.
Quotes are nothing but inspiration for the uninspired. - Richard Kemph
|
|
|
|
|
|
hi all,
i have a string
s="05/12-17:25:05-#3 05/12-17:24:56-#3 05/12-17:24:44-#0 05/12-17:24:32-#3";
like this
and have some code like this in a for loop :
string[] dateopened = new string[80];
string[] houropened = new string[80];
string[] whoopened = new string[80];
char[] splitter = { '-',' ' };
char[] myChar ={ ' ' };
while(s.Length>0)
dateopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(dateopened[i]));
houropened = s.Split(splitter);
Console.WriteLine(Convert.ToString(houropened[i]));
whoopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(whoopened[i]));
s = s.Remove(0, 17); //after adding these two lines my codes work.
s = s.Trim();
}
when i run my program i get the output like that :
05/12
05/12
05/12
17:25:05
17:25:05
17:25:05
#3
#3
#3
05/12
05/12
05/12
17:24:56
17:24:56
17:24:56
#3
#3
#3 ...
why am i getting each value 3 times ?
where am i doing wrong ?
what should i do to have each value only ones ?
thanks in advance,
bye.
-- modified at 9:35 Wednesday 14th June, 2006
|
|
|
|
|
can u mention what char u r using to split
i.e value of splitter.
try to use
dateopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(dateopened[0]));
houropened = s.Split(splitter);
Console.WriteLine(Convert.ToString(houropened[1]));
whoopened = s.Split(splitter);
Console.WriteLine(Convert.ToString(whoopened[2]));
rahul
-- modified at 4:59 Wednesday 14th June, 2006
|
|
|
|
|
It is difficult to know for sure what your problem is, as you did not include all your code. For instance, what is the value of splitter, and what does your loop look like?
Try stepping through your code and examining the value of dateopened, houropened, and whoopened. I think you will find that they all contain the same thing, an array with all the dates, all the hours, and all the whoopened.
You might try modifying it like this:
stringarray = s.Split(splitter);<br />
Console.WriteLine(Convert.ToString(stringarray[i*3]));<br />
Console.WriteLine(Convert.ToString(stringarray[i*3 +1]));<br />
Console.WriteLine(Convert.ToString(stringarray[i*3 +2]));
This is assuming that the first iteration of the loop, i is zero.
I hope this helps.
Roy.
|
|
|
|
|
I need to draw vector images in my form, so the user can modify, resize, move the points.
Can i do it?
|
|
|
|
|
Hi to all, my query is
That what is spyware signature and how can be genrated show any method and example of spyware signature.Anyone know about this query Please help.
|
|
|
|
|
|
|
Hi ebody,
I need to populate my listview with a XML file as my datasourse. I want to populate two columns from the xml file. Plz guide me.
This below xml is my xml datasource. I need to populate SearchName and ID elements from this xml to my listview.
Thanks in advance.Plzzz urgent help.. (I am using c# windows application.)
<repositorysearch>
- <fields>
<id>1
< SearchName >search name 1< /SearchName >
<documentname>document name 1
<documentdescription>description 1
<documenttype>Adobe Acrobat
- <fields>
<id>2
<searchname>search name 2
<documentname>document name 2
<documentdescription>description 2
<documenttype>Microsoft Word
-- modified at 3:50 Wednesday 14th June, 2006
|
|
|
|