Thank you for your information. I'll try that and get back to you.
You don't have to be AFRAID!
Thank you for your information. I'll try that and get back to you.
You don't have to be AFRAID!
Hi all, I have written a small piece of code which splits a text file into "N" number of output files with "X" records each. The code is working fine, But it is unable to handle special characters. When the input file has text like --> "INDUSTRIESTRAßE" It's converting it to --> "INDUSTRIESTRA?E". I have not included any provision to handle the special characters. How can I change the code so that it doesn't misinterpret these special characters while splitting a file. This is the code which reads and writes the data.
using (StreamReader sr = new StreamReader(input\_file\_path + "\\\\" + input\_file\_name))
{
if (firstLineColumns)
header = sr.ReadLine();
//Ignore the first line if the first line is columns
while (!sr.EndOfStream)
{
fs = new FileStream(target\_path + "\\\\" + target\_file\_pattern + file\_no.ToString() + extension, FileMode.Create);
sw = new StreamWriter(fs);
if (targetFirstLineColumns)
sw.WriteLine(header);
for (int i = 0; i < number\_of\_lines\_per\_file && !sr.EndOfStream; i++)
{
sw.WriteLine(sr.ReadLine());
}
sw.Close();
fs.Close();
file\_no++;
}
}
Here I want to split the input to "N" number of files with the "X" number of lines each. Please help me out here. Thank you very much! You don't have to be AFRAID!
Thank you very much Luc Pattyn! that will really help me.... I would like to go through the articles here.... But with so many of them, I find it a bit difficult to chose.... Thanks for the advice :)
You don't have to be AFRAID!
Hi all, I am new to C#.... I thought that implementing a simple calculator would help me understand the language... I have come up with a code.... It would be great if the gurus here give me feedback on this... using System; using System.Collections.Generic; using System.Text; namespace Calculator { class compute { private string[] inputNumbers; public string computeResult(string inputExpression) { string result = "There was an error while processing!"; inputExpression = inputExpression.Replace("+", "+A"); inputExpression = inputExpression.Replace("-", "-S"); inputExpression = inputExpression.Replace("*", "-M"); inputExpression = inputExpression.Replace("/", "/D"); if (inputExpression.Substring(0, 1) != "-" && inputExpression.Substring(0, 1) != "+") inputExpression = "A" + inputExpression; else inputExpression = inputExpression.Substring(1); inputNumbers = inputExpression.Split('+', '-', '*', '/'); decimal output=0; int i; int count = inputNumbers.Length; for (i = 0; i < count; i++) { string calc = ""; inputNumbers[i] = inputNumbers[i].Trim(); decimal temp; if (!decimal.TryParse(inputNumbers[i].Substring(1),out temp)) break; calc = inputNumbers[i].Substring(0,1); switch(calc) { case "A": output = output + temp; break; case "S": output = output - temp; break; case "M": output = output * temp; break; case "D": output = output / temp; break; } } if(i==count) result = output.ToString(); return result; } } }
You don't have to be AFRAID!
Thanks for the advice.. It really makes me think..
You don't have to be AFRAID!
Hi all, Wear your creative hats and come up with a creative, innovative name for a software company. The only guideline is: The name should sound like a software company's name. Appreciate your help. Thank you.
You don't have to be AFRAID!
You can go to www.asp.net and download a lot of good videos to get started.
You don't have to be AFRAID!
Hi there, Tell you what. That's a very good question. I have a clue about how you can do it. Maybe you can try it out. Here is how you do it. Edit the Gridview template so that you get all the columns you want to update. To actually update it you can have an "instead of" trigger or a stored procedure which updates the values in the two tables. Hope that helps.......
You don't have to be AFRAID!
Hi there, The information about roles, userIDs, Passwords, and profiles is stored in a SQL Database called ASPNETDB.mdf . You can find this DB by clicking on the App_Data folder in your solution explorer. Now where does this DB come from automatically? It's not magic. Whenever you set the authentication mode in the Configuration utility, An ASPNETDB is created and all the information about roles and userIDs etc, is stored in this Database. And whenever you say that this role should do this, it is from this DB the data is fetched. Hope it helps.
You don't have to be AFRAID!
Hi there, I am creating a web application which uses the login controls in Visual Studio. This application has an administrator who has the rights to change anybody's password. How can I do this in the code. I mean how do I access the password of another user. Thanks for all your time and help.
You don't have to be AFRAID!
Hi there! I have deployed my site on an IIS server. And its working fine. But I don't know how to access it from other machines.. I have tried accessing by http://192.168.1.28 where the number is the IP of the IIS server. Thanks for your help..
You don't have to be AFRAID!
Hi there! Go to the official site of ASP.NET. There you can find some really good videos for beginners. There are some 13 videos for beginners....... And if you finish them. Then you can build a really heavy application. http://www.asp.net/
You don't have to be AFRAID!
Drag and drop the Gridview control onto the work area. Now click on the quick tasks menu which is on the top right of the control. Here you get some options. Click the option New datasource and follow the instructions from there on to configure the Datasource. After finally configuring the datasource. Your Gridview should work just fine for displaying the data. But if you also want to update or delete the data, you just have to open the quick tasks menu again and check the appropriate options like edit and delete. You can't insert new values using Gridview. But if you want to do that you can use FormView control instead.
You don't have to be AFRAID!
Hi there! SQL Client is a client which only works with MS SQL server. Whereas the Oracle Client works only with the Oracle Database. The OLEDB client works with any new database including MS SQL, Oracle etc,. But if you are using MS SQL server, it's advisable to use the SQL client, Because this makes thing faster. Hope that helps......
You don't have to be AFRAID!
Change the tag's src attribute to point to the location of the image you want to display. Another reason why it's not being displayed is that the path to the image may be wrong.
You don't have to be AFRAID!
You can just compile the .cs file by selecting the target as a library and it will be compiled to a .dll This is done in Command Prompt. c:\> csc /t:library hello.cs You don't have to be AFRAID!
maria uppal wrote:
how can we enable GridView in asp.net2005
By the above statement I understand that you want to use Gridview. To use it you just have to drag and drop a Gridview on your Design pane. And then bind it to a datasource. That is all you have to do to make it work. Hope it helps....
You don't have to be AFRAID!
You can write an event for Label_click by just double clicking the Label in the Visual Studio 2005 or whatever IDE you use. This creates an event handler for the specified Label click.
You don't have to be AFRAID!
Exactly! You are placing a stored procedure in the place of an Index. If you want to call a stored procedure, there are other neat ways of doing it. Like using a stored procedure in a SQLDATASOURCE.
You don't have to be AFRAID!