15,887,945 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 SarveshShukla (Top 16 by date)
SarveshShukla
8-Jan-14 3:50am
View
There are already tons of article available on internet.Liitle googling will be of help.
SarveshShukla
7-Jan-14 5:15am
View
the syntax i mentioned is of c#
SarveshShukla
3-Jan-14 2:08am
View
This will give you the id
var x = dt.AsEnumerable().Where(dr => dr.Field("P") == id)
.Select(dr => dr.id).First();
SarveshShukla
3-Jan-14 1:37am
View
I think you need to provide credentials again as these credentials need to be sent in SOAP and when you are creating new proxy object there are no crdentials hence you are asked for the credentials.
SarveshShukla
31-Dec-13 4:02am
View
Deleted
it seems that you are initiating post request to the second page causing IsPostBack property to true
SarveshShukla
30-Dec-13 7:46am
View
Are updates working in debugging mode?
SarveshShukla
19-Dec-13 2:20am
View
either declare it in Global.asax.cs or any other cs class it does not matters, only thing is you should use the same variable while registering and resolving your types
eg if in global.asax then use it like Global.unitycontainer.Resolve
else it would be YourClass.unitycontainer.Resolve
still this is not the best practice to use dependency injection, instead you should use [Dependency] attribute for property
SarveshShukla
19-Dec-13 1:51am
View
Sumit, This will not work, you have created a container in application_start method but you are not using it for resolving types, instead you are creating a new IOC variable and using it to resolve the dependency.
Just use the code i gave in Solution 2 and then where ever you want your dependency to be injected for any property do this
[Dependency]
IBLPotential potential {get;set;}
SarveshShukla
19-Dec-13 1:45am
View
Just a thought creating your control dynamically in Go button click will not allow the viewstate of the controls to be maintained, you should be using Init event for creating any dynamic controls
SarveshShukla
19-Dec-13 0:39am
View
Deleted
This is not the way to resolve the dependency you would have to provide the interface also when u try to resolve, I do not know about your IOC class but something like IOC.Resolve<iblpotential>() should be available. I also feel that your config settings are not correct.
Please provide config details and code details so that i can see how you arr using it
SarveshShukla
19-Dec-13 0:26am
View
At which event you are loading/creating these controls
SarveshShukla
18-Dec-13 23:54pm
View
Make sure that BLPotential class is implementing interface IBLPotential
SarveshShukla
18-Dec-13 6:32am
View
What is IBLPotential? Could you please share your config/code.
did you try to register types using code as per the details i have updated above.
Seems something is wrong in config
SarveshShukla
18-Dec-13 4:48am
View
I have updated the solution to include all details, it works fine on my machine let me know if you face issues
SarveshShukla
18-Dec-13 4:06am
View
Deleted
Forgot to mention you should have Microsoft.Practice.Unity and Microsoft.Practice.Unity.Configuration dlls referenced in your application
Also in Global.asax.cs after creating your container you can register your types. Ensure that you take a static container variable so that it is available for all request
declare container variable in class
public static IUnityContainer container;
inside application_start
IUnityContainer container = new Microsoft.Practices.Unity.UnityContainer();
container.RegisterType<interface,class>();
SarveshShukla
17-Dec-13 8:23am
View
What kind of application your are developing and in which technology?
Show More