|
Thanks for replying. I've tried using FileStream and it works.
But how do i write the logic such that the name of the file changes whenever the FileStream is used?
|
|
|
|
|
troubled one wrote: for example, when someone enters "hello" in textbox1 as "message.txt", and clicks send button, the streamwriter will save the file into a notepad as "message.txt"
StreamWriter is not saving into notepad. It's saved as .txt file, and it's extension is mapped with notepad.exe on windows.
troubled one wrote: but is it possible to store that notepad permanently such that if the user clicks the send button another time with a different content like "goodbye", the streamwriter will save the file into a different notepad like "message2.txt" and the content will be "goodbye" ?
Use a filestream instead of StreamWriter. StreamWriter won't be able to create a file. But filestream can create file and write data to it. You need to keep a logic to avoid repeating the file name, if you are creating many files.
|
|
|
|
|
N a v a n e e t h wrote: StreamWriter won't be able to create a file.
Are you sure? StreamWriter creates a new file if it doesn't exist.
|
|
|
|
|
Giorgi Dalakishvili wrote: StreamWriter creates a new file if it doesn't exist.
YES.. I missed that point.
|
|
|
|
|
If you don't write large amounts of text and performance is not critical, you can also use the File class, which makes it trivially easy:
File.WriteAllText("message.txt", "Hello!");
If you'd like to append instead of overwriting, use File.AppendAllText .
|
|
|
|
|
Hai Everybody,
I want to generate the encrypted text.
I am encrypting using the SHA 256 algorithm.
Now i want to reduce this to 16 digit Hexadecimal format.
Can any one tell me how to reduce a text of any size to 16 digit Hexadecimal?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Try with Cipher data class
SSK.
|
|
|
|
|
Thank you.
Can i get the string back.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: Now i want to reduce this to 16 digit Hexadecimal format.
Can any one tell me how to reduce a text of any size to 16 digit Hexadecimal?
What do you mean by "16 digit hexadecimal format"?
Do you mean a string with just 16 digits in it? 123456789ABCDEF0 has 16 hex digits.
Do you mean to reemphasise the fact that Hexadecimal is a base 16 number?
|
|
|
|
|
The input string will vary in size.
The output should be in 16 or 20 digit i.e a licence key.
Then can I get the string back by decoding.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: Then can I get the string back by decoding.
very unlikely. You'd need a lossless compression routine to do that, but a cryptographic hash should be essentially random and largely incompressible as a result.
--
If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
|
|
|
|
|
M. J. Jaya Chitra wrote: The output should be in 16 or 20 digit i.e a licence key.
Not gonna happen. SHA256 encodes in blocks of 256 bits (or 32 bytes) so that is the smallest output you will get. If you want the string to be reversible then your output will be of comparable size to the input string (it will be rounded up to the next block boundary)
|
|
|
|
|
Hi Guys.
I need ur help Converting HTML to JPG Images format using C# using WEB Services
Can anyone know about XML Services and how will your write it
My Email Id nhsubash@gmail.com
Regrds
Subash
Subash
|
|
|
|
|
Hi,
have a look @ this http://www.guangmingsoft.net/htmlsnapshot/help.htm[^]
. may be you can get some idea.
but olny thing is coming to my mind right now is to render that html page and dump the screen bytes to am image.
that was just a thought , there could be some other way, you will get more good ideas from this forum.
Regards ,
Nishu
|
|
|
|
|
|
I have already got this but i need it using WEB Service
Subash
|
|
|
|
|
In that case first you will need to learn how to write web services
|
|
|
|
|
I have tried it in Windows App and ASP.net working fine
But using web service creating images with background color with balck
Subash
|
|
|
|
|
Hi to all,
I am developing a web application on ASP.Net using C#. In this i have used one listbox for containing list of files. Whenever i select the item from this list box i want to display the details of that file from the database, so for that purpose i used ListBox1.SelectedIndexChanged event to perform this task. but at the runtime when i select item from the listbox this event does not occurs, it occurs at the PageLoad event.
Anybody can tell me how can i remove this problem.
Pravin
|
|
|
|
|
are you using VS2003 or VS2005?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
Hi Paras,
I am using VS2003.
Pravin
|
|
|
|
|
you should check for handles clause.
missing handles clause in event handler might be the reason
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
When U select item from the listbox the first the Pageload event Occurs then after that ListBox1_SelectedIndexChanged - Event execute...
using debugging check this..if u still not get then reply me
Jintal Patel
|
|
|
|
|
|
No one cannot help u until u post the problem
Chatura Dilan
|
|
|
|