15,888,610 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 Python 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 Member 11072126 (Top 52 by date)
Member 11072126
25-Jul-23 2:43am
View
@Graeme_Grant - This is a legacy application. Not allowed to change the table design. But, need these IDs to be set in respective fields. Kindly, suggest some way out.
Thanks.
Member 11072126
12-May-23 7:55am
View
Yes I thought of taking their help but I do not have enough information regarding Registration ID and other info may be. So, thought of posting here.
Its true that without the code its really difficult to find out the solution. But, I thought may be someone faced such kind of issue ever and can help me out fixing it.
Thanks
Member 11072126
10-May-23 5:42am
View
Okay. Thanks.
Member 11072126
10-May-23 4:40am
View
Actually, I have contacted the System Admin regarding this and he tried a lot to remove read-only access from the project folder within C: drive. We are using Windows 11 here and probably all the folders in C: drive are read-only by default.
And we cannot move the project folder to other drive because to run the project locally, the .aspx pages are put inside "www" folder within C: drive, running through IIS, and that's how the local setup is being done. So, I guess moving the project folder to other drive will be a problem.
Member 11072126
14-Apr-21 12:04pm
View
Understood. You are correct.
Currently, the primary address is getting cloned but the ID is not generating a new one and I think I need to save the address objects as you are suggesting.
But, in this case, while saving the address objects I need the new Employee ID and to get the new Employee ID, I need to save the Employee first.
Now, while cloning the Employee object and saving the same, it is automatically creating clone of the address objects and setting the new Employee ID to those addresses and so the original employee losing the relationship of these address objects.
what I feel is Icloneable clone() is suitable for a single entity. It is difficult to create clones of related entities or I might have to use copy constructor?
Member 11072126
14-Apr-21 10:51am
View
Okay. Actually, here I have tried to replicate the actual scenario using Employee and Address example.
In real project, the requirement is something where I need to clone the records and the entity has related entities, those also need to be cloned and saved in the database. Once the user clicks a button, that particular item will be cloned and also saved into the database directly.
We are using EF as ORM tool.
Member 11072126
14-Apr-21 6:32am
View
I was wrong. Yes it was NULL.
So, is this the way we should create clone of all child objects and now if I have to save then I will have to call "Primary Adress saveChanges() too isn't it?
Member 11072126
14-Apr-21 6:28am
View
No its not Null, but I think since clone() returns an object of PrimaryAddress type and testObj.PrimaryAddress is a reference, is it because of that its not setting and throwing ""Object reference not set to an instance of an object." error
Member 11072126
14-Apr-21 6:01am
View
Hi, I tried the below way and am getting "Object reference not set to an instance of an object."
EmployeeEntity cloneTestObj = testObj.Clone();
cloneTestObj.Id = 0;
cloneTestObj.EmployeeName = "Agnib";
// throwing Null exception
cloneTestObj.PrimaryAddress = (PrimaryAddressEntity)testObj.PrimaryAddress.Clone();
AddEmployee(cloneTestObj);
Secondly, PrimaryAddress contain the EmployeeId, so unless I add a clone of an employee, I cannot get the EmployeeId and then how can I set the EmployeeId to Primary and Secondary address entities.
Member 11072126
13-Apr-21 13:10pm
View
Can you please share me something as how to clone those properties from the Employee clone method itself? Thanks.
Member 11072126
13-Apr-21 0:40am
View
Thanks for the response.
So, it means I need to clone separately those two child objects as I did for the Employee class? This came to my mind earlier.
But, am fetching the Employee records and applying "include" over there to fetch all the related objects too. Then why "include" is not working?
Member 11072126
7-Dec-20 8:04am
View
@Richard Deeming
Hi, I read through sendBeacon() and what I understood is that this is used to send some data on page unload. In my case, am able to update data in my database using fetch but cannot be able to end the session on browser close. since am using SAML authentication, so the session is being created by them and I cannot be able to end the session on browser close.
Member 11072126
6-Dec-20 19:26pm
View
Thanks @Richard - I will try this and let you know if it works.
Member 11072126
4-Sep-20 21:18pm
View
Hi, Thanks for the response.
I have updated my question and posted the html and ts file. I am trying to put the focus on a dropdown item, on page load. Am not sure but do I need to add any pther properties for form element, to make this thing work out?
Or does it work with "mat-Input" attribues only?
Member 11072126
1-Sep-20 3:26am
View
Thanks. It worked. Understood why arrow function was required.
Member 11072126
18-Aug-20 0:07am
View
Hi Sandeep, I found the issue. Now the callback url is working.
But, I have a callback component and i was expecting it will hit that component (wrote some code on ngInit of Callback component TS file). The control is not hitting there and moving directly to home page.
Do I need to set anything else which am missing out?
Member 11072126
29-Jul-20 5:05am
View
Actually serverless is a concept. When I was creating a Aurora DB using AWS Console UI, I saw while setting endpoints, there are two options, one of them was "Serverless".
It means, AWS will autoscale and auto shut down or start the DB as and when required. We don't need to manage it explicitly.
Member 11072126
30-Mar-20 0:29am
View
Thanks.
Member 11072126
19-Feb-20 10:16am
View
ok. thanks for your support.
Member 11072126
18-Feb-20 5:52am
View
A comboBox is being used which is of this library. Its a legacy application. Regarding the support link, they are not entertaining any question unless I provide a valid registration number and I don't have it.
Member 11072126
18-Feb-20 4:30am
View
I cannot be able to register there. Always throwing error while registration. Don't know why?
Anyways, have you worked on this BCGP controls? Then you can give an idea.
Member 11072126
18-Feb-20 4:25am
View
Ok. So, why these environment variables need to be set by running these batch files, for C++ application?
Member 11072126
17-Feb-20 22:00pm
View
This is MFC code
Member 11072126
10-Feb-20 22:53pm
View
Well, actually I learnt C++ in my college days and now when I got this project, I simply considered it as C++. I didn't have any idea about CLI or pure C++.
Member 11072126
9-Feb-20 8:25am
View
Thanks Richard for your response.
Regarding your doubt about why using vsvars32.bat as post-build event, honestly I have no idea as well and so started researching on this.
So, what I understood as of now is that if I build using Visual Studio Build option then I do not need to run this Post-Build event. If I am using any other IDE like Visual Studio Code or any other IDE who doesn't have in-built C++ compiler and configuration options (Build or Release) and also platform setting options, for those cases, we can use calling vsvars32.bat or vsdevcmd.bat to setup these platform and environment settings.
Regarding your last question, I feel its C++/CLI.
Member 11072126
21-Jan-20 1:10am
View
Okay. Thanks to all for your responses.
Let me share the updates what I tried more and what I found:
1. I got the project files into repository by cloning git link and also created pipelines but the build is getting failed saying "cannot find solution file", which is quite natural because I had added the .gitignore file within the project folder (C:/Projects/WinFormsProj/WinFormsProj/) whereas the solution file is located in the path -> (C:/Projects/WinFormsProj/WinFormsProj.sln)
2. So, I thought of creating .gitignore file in the path (C:/Projects/WinFormsProj/) where the solution file resides. First of all, this time I created .gitignore file from Azure Devops repos section, but cannot find the file anywhere into my project folder. Secondly, when am trying to run the command "git add .", it is throwing errors:
error: open(".vs/WinFormsProj/v15/Server/sqlite3/db.lock"): Permission denied
error: unable to index file '.vs/WinFormsProj/v15/Server/sqlite3/db.lock'
fatal: adding files failed
Am not understanding the exact steps need to be done for this repository part and not even getting any proper tutorial for this too.
Member 11072126
19-Jan-20 3:32am
View
In repos section I need to choose the repository path, where it is asking me to choose any GIT repository path. So, how to link my VS project folder to this repository GIT path?
Member 11072126
10-Oct-19 5:12am
View
Thanks @CPallini for the response. Even Griff also told the same.
Member 11072126
10-Oct-19 3:28am
View
Yes. I knew that. Consider, I have only one interface with few methods. In that case, I can always create a pure abstract class and get my job done. Isn't it?
Then there must be some other reason too why to use interface and not pure abstract class or vice-versa.
It could be related to builds or implementation or security whatever.
I am thinking from all aspects actually.
Please let me know if you also can find out some other points.
Thanks a lot.
Member 11072126
10-Oct-19 2:38am
View
Hi, thanks for your response. But, i know about the multiple inheritence thing and i know that interface can solve it.
I wanted to know anything except multiple inheritence.
Member 11072126
24-Sep-18 8:25am
View
Yes. Correct.
Anyways, thank you all for your responses. Its been done. I created an action method inside a Controller and pointing ajax call to that.
Member 11072126
24-Sep-18 6:09am
View
Yes. I also know the same. We cannot call any method from a .cs file. I know how to call any action method in the controller. Thank you very much.
Member 11072126
23-Nov-17 1:38am
View
Ok. Thanks. So, MVC internally follows Factory Design Pattern? Can you suggest any article if I would like to know hoe MVC works internally? I mean, when the request is coming, which interface or class it is calling internally and all these concepts
Member 11072126
22-Nov-17 5:19am
View
Thanks for your response Afzaal. There is no such need for me to pass the parameter in the constructor. I was just thinking about this because I thought that it is also a class and if I can pass any parameter through the constructor or not?
If I can pass then how it will be invoked unless I pass any value into the constructor.
But, we don't create any object of the controller explicitly, the controller and actions are called on the basis of my routing path.
So, is it possible to create any parameterized constructor in controller? if yes, how to invoke it and if No, then why?
Member 11072126
16-Oct-17 9:49am
View
Still having some doubts. But, anyways thanks to you and Kornfeld for your responses and explanations. It was definitely useful.
Member 11072126
16-Oct-17 7:06am
View
Yes, I have read various articles. But, the only valid point am getting is that I for interfaces, I can be implement multiple interfaces but not possible with abstract class. The other points, when analyzed, can be seen that the same thing is possible for both abstract class and interface.
Member 11072126
16-Oct-17 7:01am
View
Thanks. But, I didn't get the advantage of using abstract class over interface.
Suppose, I have an interface named as "ITransact", and it contains a method named as "respModel Show(reqModel)", its taking the requestObject as argument and sending back the responseObject.
Now, the same method can be written as abstract method in an abstract class and I can use inherit the abstract class instead of implementing the interface.
Yes, of course I can't use inherit more than one class but can implement multiple interfaces. Except this point, is there any other major advantages of using interface?
Member 11072126
16-Oct-17 6:38am
View
Thanks. I completely agree with you that I can reuse the same interface for many classes.
Now, I have one more doubt that is:
When to use Abstract Class and when to use Interface?
As far as I am concerned, Abstract Class is used for IS-A relationships and interface for HAS-A relationships. But, for HAS-A relationships also, I can use Abstract Class instead of using interface.
Secondly, if my class needs to declare variables then I can go for abstract class instead of interface. But, I can implement the same using interface as I can declare properties.
So, I cannot be able to differentiate exactly when to use abstract class and interface
Member 11072126
14-Jan-17 8:37am
View
Thanks a lot for your response.
I have also gone through the localization concept in Asp.Net but I think I will have to write Hindi equivalent word for each English word, manually, and need to maintain it in resource file. So, if the website contains lot of lectures then it is really a time-consuming job to write the Hindi equivalent word for each and every word/sentence. is there any tool which can translate the English content into Hindi accurately or if there is anything I can do using C# code, for this?
Moreover, I can post the angular code what I wrote and what exactly my doubt or clarification
Member 11072126
21-Dec-16 3:50am
View
Ok. I was trying to understand the flow of login in my application. So, I put a breakpoint in Login button and ran the application using "Gulp" command in nodejs command prompt. the application ran and when I clicked the button, it didn't hit the login code.
Then, I stopped the application and clicked the "Debug" option, in Visual studio code editor. Nothing happened actually
Member 11072126
12-Aug-15 13:08pm
View
Thanks a lot man. It worked.
Member 11072126
12-Aug-15 7:26am
View
Thanks Damith. I understood.
Member 11072126
8-Aug-15 13:28pm
View
Thanks for the reply.
This one I saw and its saying that I will have to install 'migration package' separately (which I do not want) and update the database using visual studio command prompt.
Is there any other way out? I mean is there any trick which I can use in the context class to update the table instead of installing 'Migration Package'?
Member 11072126
8-Aug-15 13:24pm
View
Thanks to all.
Member 11072126
3-Aug-15 5:49am
View
Thans to all of you for the support.
Member 11072126
3-Aug-15 5:48am
View
My mistake. Now, I understood the whole scenario and flow how it should work.
Member 11072126
3-Aug-15 5:47am
View
Ok. Thank you.
Member 11072126
3-Aug-15 5:44am
View
Thank you. It helped me a lot. I understood the flow now.
Member 11072126
2-Aug-15 14:03pm
View
Actually, I will be calling through jquery ajax.
I need to host the service separately and the asp.net application separately. So, while developing, how to test them? Do I need to host both of them in IIS and then to refer the service in the asp.net application?
If that so, then while deployment how do I change the service reference url? Because, I am going to deploy the dll for both of them.
Member 11072126
2-Aug-15 14:02pm
View
Thank you for the reply. Actually, I need to host the service separately and the asp.net application separately. So, while developing, how to test them? Do I need to host both of them in IIS and then to refer the service in the asp.net application?
If that so, then while deployment how do I change the service reference url? Because, I am going to deploy the dll for both of them.
Member 11072126
2-Aug-15 14:02pm
View
Thanks. This is obviously helpful. Let me go through it properly and then I might again ask you if I have any other queries.
Thanks a lot.
Member 11072126
2-Aug-15 14:00pm
View
Thank you for the reply. Actually, I need to host the service separately and the asp.net application separately. So, while developing, how to test them? Do I need to host both of them in IIS and then to refer the service in the asp.net application?
If that so, then while deployment how do I change the service reference url? Because, I am going to deploy the dll for both of them.
Show More