Click here to Skip to main content
15,891,431 members
Home / Discussions / C#
   

C#

 
GeneralRe: HOw to solve input string was not in the correct format Pin
CHill6025-Jun-15 6:04
mveCHill6025-Jun-15 6:04 
QuestionDoes anyone experienced in the text-to-speech in C# WinForm ? Pin
goldsoft24-Jun-15 23:51
goldsoft24-Jun-15 23:51 
AnswerRe: Does anyone experienced in the text-to-speech in C# WinForm ? Pin
Mycroft Holmes24-Jun-15 23:56
professionalMycroft Holmes24-Jun-15 23:56 
AnswerRe: Does anyone experienced in the text-to-speech in C# WinForm ? Pin
Eddy Vluggen25-Jun-15 9:48
professionalEddy Vluggen25-Jun-15 9:48 
QuestionWhat to do if I want to return rows from different tables in ASP.NET WebService Pin
jasonalien24-Jun-15 22:41
jasonalien24-Jun-15 22:41 
AnswerRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
F-ES Sitecore25-Jun-15 0:02
professionalF-ES Sitecore25-Jun-15 0:02 
GeneralRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
jasonalien25-Jun-15 0:14
jasonalien25-Jun-15 0:14 
GeneralRe: What to do if I want to return rows from different tables in ASP.NET WebService Pin
F-ES Sitecore25-Jun-15 0:23
professionalF-ES Sitecore25-Jun-15 0:23 
Questionstoring result into byte[] Pin
Member 1171394224-Jun-15 21:04
Member 1171394224-Jun-15 21:04 
AnswerRe: storing result into byte[] Pin
Pete O'Hanlon24-Jun-15 23:50
mvePete O'Hanlon24-Jun-15 23:50 
GeneralRe: storing result into byte[] Pin
Member 1171394227-Jun-15 0:39
Member 1171394227-Jun-15 0:39 
QuestionWinform MDI child form render not properly. Pin
kutty balaji24-Jun-15 20:42
kutty balaji24-Jun-15 20:42 
AnswerRe: Winform MDI child form render not properly. Pin
Dave Kreskowiak25-Jun-15 3:42
mveDave Kreskowiak25-Jun-15 3:42 
QuestionOwn Mail Server with own domain Pin
abhijit.mdccb24-Jun-15 20:20
abhijit.mdccb24-Jun-15 20:20 
AnswerRe: Own Mail Server with own domain Pin
Richard MacCutchan24-Jun-15 22:15
mveRichard MacCutchan24-Jun-15 22:15 
QuestionSaving stream as a PDF file to disk Pin
Member 1171394224-Jun-15 12:17
Member 1171394224-Jun-15 12:17 
AnswerRe: Saving stream as a PDF file to disk PinPopular
Sascha Lefèvre24-Jun-15 13:53
professionalSascha Lefèvre24-Jun-15 13:53 
GeneralRe: Saving stream as a PDF file to disk Pin
Member 1171394227-Jun-15 0:38
Member 1171394227-Jun-15 0:38 
QuestionHelp with Windows Form and IF statement Pin
Member 1147010024-Jun-15 9:04
Member 1147010024-Jun-15 9:04 
GeneralRe: Help with Windows Form and IF statement Pin
Sascha Lefèvre24-Jun-15 9:41
professionalSascha Lefèvre24-Jun-15 9:41 
GeneralRe: Help with Windows Form and IF statement Pin
Member 1147010024-Jun-15 11:19
Member 1147010024-Jun-15 11:19 
GeneralRe: Help with Windows Form and IF statement Pin
Sascha Lefèvre24-Jun-15 12:03
professionalSascha Lefèvre24-Jun-15 12:03 
QuestionStore one value from rows of data in a table Pin
Rajesh_198024-Jun-15 8:37
Rajesh_198024-Jun-15 8:37 
I have a table with 3 columns. Container # , Container Size and Pickup Location.

I am looping through each of the rows and append all the data to a string variable.

However, I also need to store the Pick up location(input by user, and will be same for all containers in a request) to be stored in a variable. How do I go about it?
C#
 var pickLoc = document.getElementById('_pickLoc');//_pickLoc is a Hidden Variable

for (i=1; i<=lastRow; i++) 
    {
        var dataStr;
        var localvar;
       
	  //Validating Container number
      var aRow = document.getElementById('txtRow' + i);
      if (aRow.value.length <= 0) 
      {
        alert('Row ' + i + ': Container number is empty');
        document.getElementById('txtRow' + i).style.backgroundColor = "#ffff99";
        document.getElementById('txtRow' + i).focus();
        return;
       }
       else {
            
            document.getElementById('txtRow' + i).style.backgroundColor = "";
			dataStr = "<tr><td height=5></td></tr><tr><td><FONT face='Verdana' size='1'>";
			dataStr += document.getElementById('txtRow' + i).value;
			dataStr += "</Font></td><td><FONT face='Verdana' size='1'>";
        }
       
       //_cntrSize
      	var e = document.getElementById('_cntrSize' + i);
	  if (e.options[e.selectedIndex].value == "") 
	  {
		 //dataStr +=  '</td></tr><tr>';
		 alert('Row ' + i + ': Container Size is empty');
		 e.style.backgroundColor = "#ffff99";
         e.focus();
         return;
		}
       else {
			 e.style.backgroundColor = "";
			 dataStr += e.options[e.selectedIndex].value;
			 dataStr +=  "</Font></td><td><FONT face='Verdana' size='1'>";
		}
		
		//Pickup Location Type
      var LocRow = document.getElementById('txtLocRow' + i);
      if (LocRow.value.length <= 0) {
        alert('Row ' + i + ': Pick up location is empty');
        document.getElementById('txtLocRow' + i).style.backgroundColor = "#ffff99";
        document.getElementById('txtLocRow' + i).focus();
        return;
       }
       else {document.getElementById('txtLocRow' + i).style.backgroundColor = "";
			 dataStr += document.getElementById('txtLocRow' + i).value;
			 dataStr += "</Font></td><td><FONT face='Verdana' size='1'>";
			 localvar = document.getElementById('txtLocRow' + i).value;
        }
        pickLoc.Value = localvar; 	
	 ttlStr += dataStr;
    }

SuggestionRe: Store one value from rows of data in a table Pin
Richard Deeming24-Jun-15 8:51
mveRichard Deeming24-Jun-15 8:51 
GeneralRe: Store one value from rows of data in a table Pin
Rajesh_198025-Jun-15 4:15
Rajesh_198025-Jun-15 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.