16,011,905 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by vinayvraman (Top 13 by date)
vinayvraman
16-Jun-15 5:56am
View
DesignMode indicates if the Control (or component) is currently in DesignMode. When in design mode, the designer executes some of the code (in ctor and OnLoad functions). You do not have to do anything extra. In the constructor, just a add a check like shown above.
But I strong suggest you to check the cause of the error and put the DesignMode check in relevant place.
See this link: https://msdn.microsoft.com/en-us/library/system.componentmodel.component.designmode(v=vs.110).aspx
vinayvraman
1-Jun-15 23:01pm
View
What do you want to download in the row? Is it the image that you are trying to download?
vinayvraman
1-Jun-15 22:58pm
View
What is the data source that is bound to the grid view?
Have you tried selecting the row by clicking on the row header? If yes, then delete should automatically work if the data source is say DataTable. You do not have to handle the delete event explicitly.
vinayvraman
1-Jun-15 22:47pm
View
Please elaborate on the error/exception you get.
vinayvraman
26-May-15 6:21am
View
I guess the problem is in the way you have constructed the string. It should have been like this
Use double quotes for attribute values instead of single quotes.
$("#ButtonSec").html('<input type="button" ng-click="Parent.MyEvent()" value="inner button"/>');
vinayvraman
26-May-15 6:14am
View
What do you mean when you say doesn't work? Does it timeout? Does it throw any error?
vinayvraman
26-May-15 6:12am
View
Just curious! Why not convert the data into a XML file and save the file as a single column data in the table? Or on second thought I suggest you to put the most important fields in CSV as columns and the rest of them as a single column XML data.
vinayvraman
26-May-15 3:08am
View
Exactly Sergey. I second your thoughts. And for the same reason I have suggested to add lock just before insert and after all the processing is completed. But since the InsertData method is not shown, it is difficult to give any concrete solution.
vinayvraman
26-May-15 2:23am
View
Nirbhay, I am not here to write code for you. I am suggesting code based on what you have described above.
You are mixing up asp.net terms with html terms. There is no concept of user controls in html. And getElementById method in JavaScript gives you all elements matching the given value in a page irrespective of which level it is in. So please confirm if you are looking for client side JavaScript code or server side ASP.NET c# code?
If you want to drill down to a particular level and then find the element, then do a document.getElementById on the outer elements first and then do a getElementById on the inner element.
There are several ways to get into nested level:
1. use querySelector in JavaScript
2. use nested getElement. Eg. document.getElement("DASource1").getElements("gv1");
On the server side recursively call FindControl to fetch the required control. First select the outermost usercontrol and then in each of those user controls recursively search for the gridview.
http://stackoverflow.com/questions/3157788/how-can-i-use-findcontrol-method-in-asp-net
vinayvraman
26-May-15 0:07am
View
Hi Mathi Mani, thank you for the links. I have implemented the task cancellation by using the ContinueWith and a CancellationTokenSource.
<pre lang="c#">
private static void CheckIfOtherTasksNeedToBeCancelled(Task task, CancellationTokenSource cancellationTokenSource)
{
if (task.IsFaulted)
{
cancellationTokenSource.Cancel();
throw task.Exception.InnerException;
}
}
// The task initialization has changed to
Task[] tasks = new Task[]
{
Task.Factory.StartNew(() => Method1(), taskCancellationSource.Token)
.ContinueWith(t => CheckIfOtherTasksNeedToBeCancelled(t, taskCancellationSource)),
Task.Factory.StartNew(() => Method2(), taskCancellationSource.Token)
.ContinueWith(t => CheckIfOtherTasksNeedToBeCancelled(t, taskCancellationSource)),
Task.Factory.StartNew(() => Method3(), taskCancellationSource.Token)
.ContinueWith(t => CheckIfOtherTasksNeedToBeCancelled(t, taskCancellationSource))
};
</pre>
vinayvraman
22-May-15 5:43am
View
This is what the MSDN documentation for ReadLine says
"A line is defined as a sequence of characters followed by a line feed ("\n"), a carriage return ("\r"), or a carriage return immediately followed by a line feed ("\r\n"). The string that is returned does not contain the terminating carriage return or line feed. The returned value is null if the end of the input stream is reached."
So according to the above description and looking at your code from line 97 to line 111, it seems to me that the ReadLine is returning null. And hence "line" is null thus "lines_data" is also null.
Changing your code to something like the below code may help you.
while ((line = reader_trajectoires.ReadLine ()) != null) {
counter++;
if ((counter % 9) == 1)
continue;
string lines_data;
lines_data = line;
data [cpt] = lines_data.Split (new string[] {"\t"}, StringSplitOptions.RemoveEmptyEntries);
cpt ++;
}
vinayvraman
12-Jun-12 10:11am
View
Lets consider I am trying to load assembly 'A.dll' which in turn refers an assembly 'B.dll'.
A.dll and B.dll are in the same directory.
The dlls are provided by the user (i.e. he/she selects the assembly) for which class member information is required.
The above code gets fully qualified path for A.dll and hence File.Exists() method succeeds. But when the PrintAllPublicMembers method is called, and assembly.GetTypes() method is executed, I get an exception.
Am I missing anything here?
vinayvraman
12-Jun-12 7:51am
View
Hi SA,
The user selects the assemblies for which he needs to see the public members of the class. The original idea of the app was to fetch all the public members of the class. Since it wasn't working for Properties and methods, I have excluded the rest of them from the sample source code I have uploaded here.
Some of the referenced assemblies are not in GAC and it is for these assemblies I am getting the above mentioned exception. And the exception seems to be valid for me. The assembly load function is not able to load the assemblies from its start up path. But if I put my application in the path where the assemblies exist, then it is able to load all the referenced assemblies.
Best Regards
Vinay
Show More