|
I understood that you want to have it read-only.
Probably discarding the TextBox and replacing it with e.g. a ListView [^] control in virtual mode [^] or a Data grid[^] (with one column then) would be the best way to go.
Or e.g. use a WebBrowser control to show the text.
|
|
|
|
|
Thanks for the replies. I experimented with the ListView - 30,000 thousand lines with no problem. Since most users will probably apply some heavy filtering, there shouldn't be any problem. I don't even have to use virtual mode.
I'll try out the datagridview to see which is easier to use.
|
|
|
|
|
Hi,
I need to know Split method of string. I have data in the string variable like following and i need to know, how may I split and directly convert into Arraylist or Dataset or DataTable ?
kindly give method with sample commands.
Thank you very much in advance
Sample Data
===========
apple,500,15.50,0000010105,good,A001
(Riaz)
|
|
|
|
|
MSDN[^] not good enough for you?
/ravi
|
|
|
|
|
You already know it's called Split , so what is your question?
|
|
|
|
|
string sample = "apple,500,15.50,0000010105,good,A001";
string[] sp = sample.split(',');
output:
sp[0] = "apple";
sp[1] = "500":
sp[2] = "15.50":
sp[3] = "0000010105":
sp[4] = "good";
sp[5] = "A001";
|
|
|
|
|
I guess he needs one step further. The requirement is to get an ArrayList, here's code snippet -
string sample = "apple,500,15.50,0000010105,good,A001";
string[] sp = sample.Split(',');
ArrayList arr = new ArrayList(sp);
foreach (object item in arr)
{
Console.WriteLine(item);
}
Hope this would help.
|
|
|
|
|
Arindam Sinha wrote: ArrayList arr = new ArrayList(sp); foreach (object item in arr) { Console.WriteLine(item); }
no need for reassigning it in ArrList
we can use like this..
for(int i=0;i<sp.length-1;i++)
{
console.writeline(sp[i]);
}
<div="" class="ForumSig">Padmanabhan
My Articles:
Articles[^]
My latest Article:
Word Automation[^]
|
|
|
|
|
Yes I know. It was done only for the original request. He needs an ArrayList.
|
|
|
|
|
Thank you very much friend
|
|
|
|
|
|
Hi!!
I'm doing a small application, but do not know how to get the path of a folder when click right this folder(as cut,copy of windows).
Help me. Thanks!!!
|
|
|
|
|
You have to give a little more detail. How are you listing the folders? Is it a listbox, treeview???
only two letters away from being an asset
|
|
|
|
|
Not sure what you mean. If you are copying from Windows Explorer, the clipboard would hold a description of what you copied/deleted in various formats.
Clipboard.GetFileDropList() or Clipboard.GetText() might fit your needs.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
When I add a new connection string in my .setting file it brings up a nice Connection Manager screen, which allows me to select the appropiate setting for my connection. I was just wondering if anyone knows how I could bring this screen up once my app has been installed at the client. To make it easier for him to select the connection string.
Thanks.
|
|
|
|
|
Your requirement is not clear to me.Why do you want your end user to put the the connection string?
In general, the end user should only install the application (I am assuming it's a desktop application). If you are working on a WebApp,then end user does not have that choice as the application would be in IIS server.
The screen that you get that's a feature of Visual Studio.
|
|
|
|
|
If you feel that you really must do this, although it credits your users with more smarts than the average, download the SQLServer2008/2005 samples from here[^].
In the programmability part there is a sample called ServerConnect which does a pretty good imitation of a Connection Manager.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i want to create a C# win app that allows the user to enter in a text box some data and press send..
the data in the text box will be sent to the web app (server side) and store this data in a text file on the web app.
thx!!
|
|
|
|
|
You should be using a database. The windows app would write to the database and the web app would read from it to display.
only two letters away from being an asset
|
|
|
|
|
you can use webservice to communicate with server.
Create new web site project , Add new item , WebService (Asmx) and it gives you an example method with [WebMethod] attribute. You can add parameter to it and rename as you wish, then go to your win app project right click the project item and click Add Web Reference (Vs2005) or Add Service Reference (Vs2008) then write your asmx file's address into the box then give a name for your local service client object. Press ok to close dialog.
Write these to make SOAP request :
YourObjectName obj = new YourObjectName();
obj.YourWebMethodName(parameters);
i hope, you find this useful.
My Personal Blog about Software Developing
|
|
|
|
|
do u have a simple project to do that work...cos i'm a bigener in that projects..
thx.
|
|
|
|
|
|
For a beginner don't you think this is a bit complicated? Connect both apps to a database, plenty of examples and easy for a beginner to understand
only two letters away from being an asset
|
|
|
|
|
Until race conditions come into play, and he has to use either IPC or mutexes to stop one application reading as the other is writing
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Computafreak wrote: Until race conditions come into play
Explain where and how this senerio would occur. Are you saying the database wouldn't be able to deal with concurrency issues? How would using a webserive or writing to a file lessen this risk?
only two letters away from being an asset
|
|
|
|