Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Jahliah

I'm able to read rows separated by "~" but once I try to read the values separated by comma, my output returns nothing. Any help is appreciated! strInput is a .csv file. Content= strField[0],strField[1],strField[2],strField[3],srField[4],strField[5]~ strField[0],strField[1],strField[2],strField[3],srField[4],strField[5]~ strField[0],strField[1],strField[2],strField[3],srField[4],strField[5]~ using (StreamWriter write = new StreamWriter(filePath, true)){ string[] line = strInput.Split('~'); foreach (string part …

Member Avatar for MarkAMalo
0
216
Member Avatar for Jahliah

The output that i get keeps repeating. For example, strInput= "orange~banana~banana~apple" but what i get is this output= "orange~orange banana~orange banana banana~orange banana banana apple" I'm pretty sure my regex is right. Any help would be much appreciated. Thanks! using (StreamWriter write = new StreamWriter(filePath, true)) { string[] line = …

Member Avatar for Sulaiman_1
0
166
Member Avatar for Jahliah

In the previous post, I had difficulty accessing fields separated by comma in "~" separated rows. Example "a,b,c~d,e,f~g,h,i~" But after writing the output I get the following result: "a,b,c~ a,b,c~ d,e,f~ a,b,c~ d,e,f~ g,h,i~" my desired result is as below: "a,b,c~ d,e,f~ g,h,i~" Any help is appreciated. Thanks! using (StreamWriter …

Member Avatar for sai ram
0
154
Member Avatar for Jahliah

Basically im using switch case to set strOutput. But i get duplicate values instead.. strInput="00\~01\02~" This is what i get: A AB ABC My desired outcome is: A B C MatchCollection matches = Regex.Matches(strInput, @"\d{2}\\"); string range = matches[0].Value; switch (range) { case "00\\": strOutput += "A"; break; case "01\\": …

Member Avatar for Jahliah
0
207
Member Avatar for Jahliah

Hi guys I want to convert the following string to datetime format but not sure how to go from here Any help is appreciated. Thanks! 2013063018 to 30/06/2013 18:00 string date = strFields[0]; //string format = "ddMMyyyHH"; DateTime dt = DateTime.ParseExact(date, "dd/mm/yyyy hh:ss", CultureInfo.InvariantCulture);

Member Avatar for Ketsuekiame
0
267
Member Avatar for Jahliah

It's just a simple code but I don't know where I'm missing quotations or etc My error lies here: case "000\"; Any help is appreciated! Thanks! MatchCollection matches1 = Regex.Matches(strFields[3], @"\d{3}\\"); string range = matches1[0].Value; switch (range) { case "000\"; strAdType += "A"; break; case "001\": strAdType += "B"; break; …

Member Avatar for Jahliah
0
174
Member Avatar for Jahliah

Is it possible to simplify the codes below by using while loop? Match firstMatch1 = matches1[0]; Match firstMatch2 = matches1[1]; Match firstMatch3 = matches1[2]; Match firstMatch4 = matches1[3]; Match firstMatch5 = matches1[4]; Match firstMatch6 = matches1[5]; Match firstMatch7 = matches1[6]; Match firstMatch8 = matches1[7]; Match firstMatch9 = matches1[8]; Match firstMatch10 …

Member Avatar for Jahliah
0
119
Member Avatar for Jahliah

I have the following codes and I'm not sure if there's a better or easier way of doing it? Any help appreciated. Thanks! MatchCollection matches1 = Regex.Matches(txt_description.Value, @"\d{2}:\d{2}:\d{2}"); Match firstMatch1 = matches1[0]; Match firstMatch2 = matches1[1]; Match firstMatch3 = matches1[2]; Match firstMatch4 = matches1[3]; td1.InnerHtml = firstMatch1.Value; td2.InnerHtml = firstMatch2.Value; …

Member Avatar for Jahliah
0
146
Member Avatar for Jahliah

Basically I have two files: details.html details.cs I would like to use details.cs to write values to details.html but the html textbox stays the same. Would appreciate any help. Thanks! **details.html** <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="details.cs" Inherits="Details.DetailsHTML" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body> <form> <input …

0
84
Member Avatar for Jahliah

I have two files: apple.html banana.cs apple.html contains a html table. So my question is: Is it possible to write values to the html table in apple.html using banana.cs? Any help is appreciated. Thank you!

Member Avatar for ddanbe
0
94
Member Avatar for Jahliah

I'm trying to get the time from input of html txt_URL but the array returns nothing. Not sure where I went wrong. Any help is appreciated. Thanks! **input:** Deleting 11 files. Details: Time Deleted = 01:16:30, Time Left = 00:00:00, **output:** 01:16:30 string before = txt_URL.Value; string after = Regex.Replace(before, …

Member Avatar for Jahliah
0
324
Member Avatar for Jahliah

Is it possible to replace commas and spaces with commas in c#? I'm fresh in c# and am looking for guidance. Any help is appreciated! **Before:** Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00 **After:** Deleting,11,files,ABC: Total,Time,01:16:30,Remaining,Time,00:00:00

Member Avatar for Ketsuekiame
0
4K
Member Avatar for Jahliah

In example.aspx, i have a html textbox named txtbox_1. In it, I have the following value: **1a,3d,2cc,wedd,aqq** I would like to read individual values separated by commas and place it different textbosz. currently i can read the textbox value as a whole and not individually. Hope this is clear. Would …

Member Avatar for Jahliah
0
152
Member Avatar for Jahliah

I want to set value for html input text through code behind but can't seem to work :( p.s. i'm new to c# and this is my first c# project. I appreciate any type of help or critic. Thanks! Error in banana.cs: "txt_URL" is not in context apple.html: <%@ Page …

0
100