|
sorry to post this issue may be in wrong category but please some one tell me what is code coverage feature come with IDE ?
what is the benefit of code coverage feature ?
whose responsibility to use code coverage feature ? developer responsibility or tester ?
tbhattacharjee
|
|
|
|
|
It's for your unit tests, it shows you how much of the code you are executing during your tests, and which bits of code are not being tested which allows you to expand your tests in order to ensure you test everything.
|
|
|
|
|
New to MVC
I want to add a Login button to my home page that mimics the built in login on the menu bar.
Just want to give the user an option.
Thanks
modified 16-Jan-17 1:35am.
|
|
|
|
|
There are millions of ways of doing this. Do you have a specific question?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I know there are many ways to do most things in programming.
I created an MVC app with Identity - Individual account.
I want to keep the main menu login and just add an alternate login button/link on the homepage.
Wish I could be more specific. Searches just bring up "Custom Login Pages", which I am not trying to do.
|
|
|
|
|
MichaelLuna wrote: just bring up "Custom Login Pages", which I am not trying to do. But you are doing a custom login page.
MichaelLuna wrote: just add an alternate login button/link on the homepage. So, add a link or a button. I'm not sure what the problem is.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
You add the button in the same way that you add any other link:
@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { @class = "btn btn-default" })
Or:
<a class="btn btn-default" href="@Url.Action("Login", "Account")">Log in</a>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank You.
Exactly what I needed.
Both examples gave me a better understanding of the how the view refers to the controller.
Sorry for such a basic question. I'm sure my questions will get more sophisticated in time. The move to MVC from WPF is much harder than I imagined.
|
|
|
|
|
Hi Expert
I went to create webservice using asp.net, project is to convert base64 image into string, plz help i am fresher, interviewer are provide task
Thanks
|
|
|
|
|
Member 12949046 wrote: interviewer are provide task We'll gladly help but we won't do it all for you. So, ask a question. Where are you stuck?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
When developing a website under ASP.NET 2013, it was possible to open a "mobile phone" from one of the pulldowns to see what the new website would look like in a variety of phone types. I think that was available from a phone SDK that I had installed.
I have been searching for something similar for ASP.NET 2015 but without success. Does anyone know if something similar exists?
|
|
|
|
|
|
Sorry it has taken so long to get back to you but it has been a very busy couple of weeks with the Bowls Club AGM to prepare for. Anyway, thanks for your reply.
I have followed up your link without any success. The only option, Windows Phone SDK Downloads, seems to lead to an old page. However the Downloads tab on that page suggests that VS 2015 Update 3 already contains Win10 Mobile emulators. I have that installed, so all I need to do is find the emulator.
Thanks again for you help.
|
|
|
|
|
I'm kind of new to MVC (been programming for about 6 months), I'm looking for some help trying to learn standard coding in mvc, I already have my model and classes separate in another project but what I'm looking for is things like exception handling, standard view messages for example I have a class called returnMessage and through this I send anything I want back to my view (in ViewBag) and display it there, so if you could guide me thought or give me some articles to read that would be fantastic.
Regards, Mr.K
|
|
|
|
|
|
My advice would be to get a book on MVC and just go through it. The ViewBag is ok, it "works" but it's not really best practice, you'll want to use models to pass data to your views as they are strongly typed and can contain the logic they need. Obviously no-one can explain all of the issues and standards to do you in a forum post which is why it's best to get a book on MVC as that should take you through everything you need to know.
|
|
|
|
|
You may check coding guidelines rather than standards that will help you learn and make feasible application
highlighted points are as below
- DO separate the model its own project with a distinct assembly
- DO put all business logic in the model.
- DO put all validation logic in the model
- DO define interfaces for data access
- DO put all session logic in the model
- DO put HTML in Views and Partial Views (not in a controller).
More you can get on This link[^]
Find More .Net development tips at : .NET Tips
The only reason people get lost in thought is because it's unfamiliar territory.
|
|
|
|
|
Hi Guys,
I am getting the below errors frequently whenever any deployment or after 40 minutes I am getting the below error only in UAT environment. But not in Production Environment . All codes are same in UAT and Prod.
Please suggest any solution
Could not load file or assembly 'vjscor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'vjscor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 38:
Line 39:
Line 40: <asp:toolkitscriptmanager id="ToolkitScriptManager1" runat="server">
Line 41:
Line 42:
Source File: D:\Projects\AEDDO\login.aspx Line: 40
Assembly Load Trace: The following information can be helpful to determine why the assembly 'vjscor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' could not be loaded.
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
|
|
|
|
|
deepak26123 wrote: Please suggest any solution The solution is to investigate why the system cannot find that file.
|
|
|
|
|
There is no file in with this name in PROD also but PROD is not throwing any error
and Also error will be gone if you refresh the page
|
|
|
|
|
Sounds like the working server has the Visual J# redistributable installed, and the non-working server doesn't.
Try installing the relevant v2 package from Visual J# Home[^].
Alternatively, try upgrading to the most recent version of the AJAX Control Toolkit[^], which shouldn't have any dependency on Visual J#.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I need to enable my admin user to change access permissions for users on the fly, such that they can create new Roles and add permissions to those Roles and assign that role to any user at run time.
I don't want to 'set' the roles during development, as in [Authorize(Roles="Role1, Role2")] etc because after development if i add roles to any user then again i have to recompile the code and copy the changed dll to project bin folder.
we often hard code the role name with authorized attribute but what if i need to do this kind of association at run time in asp.net mvc project. is it possible please discuss all your thought.
i have seen your have good control on role base access system development. so please guide me how can i add roles to action or controller at run time.if possible please discuss this topic with sample code.
thanks
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: if possible please discuss this topic with sample code. A quick google would get you recent discussions with sample code.
Attributes are compiled, and you can't add one without recompiling. The idea is to define "roles" for certain tasks, and assign a user to that role if he/she is allowed to do so.
Not to add/remove roles as users are removed/added.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
sorry not clear. can u plzz redirect me to few right article on the same topic because in code i do not want to hard code roles name with action method in asp.net mvc.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: can u plzz redirect me to few right article on the same topic Understanding Role Management[^]
Introduction to Membership[^]
Tridip Bhattacharjee wrote: because in code i do not want to hard code roles name with action method So, one day the action method is executed by role 1, and the next day by role 2?
That's how it works; you assign "admin" to the action method, and assign a user to that role if he/she is allowed to execute. You do not change the role.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|