In addition to ensuring the script is only written once, if you are writing a user control then you can only control the mark-up inside that control, so it wouldn't be possible to inject a label for js at the bottom of the page.
My biggest issue with RegisterStartupScript etc is the name, it should be changed to RegisterStartupScriptPleaseNoteThatYourJSIsNOTBeingExecutedImmediatelyInServerSideCode
Hi, I am creating a scheduling website for a university project using Visual Studios. It is a website for managing shifts and schedules and the main event of the website is the scheduler which will display employee shifts within it. I have never created a timetable/calendar/scheduler in Visual Studios before. How can I produce a simple scheduler in C# that can be modified and links to a database?
Have you tried finding some resource at google for this? I believe there are tons for existing articles on how to build stuff like scheduler. Also, instead of rolling out your own, have you considered using a precooked tools that were available and fully tested? For example:
Thanks for the reply. I have searched Google for resources and I couldn’t find what I wanted; so I turned to forums with the hope that people who have successfully created schedules in Visual Studios could give me their knowledge.
The links that you gave me are just what I need. I will attempt compiling the code and editing it to suit my needs. Thanks again.
I wonder whether this post is a bit misplaced.
Nevertheless, I'm just in a middle of reading Eric Evan's book and I see DDD as a much broader concept than onion architecture. The second one stands for how you organize your application components. Although DDD also to some extent operates with those components and also advocates some patterns (side-effect free functions, specification pattern, bounded-context etc) I would say that the crucial idea behind DDD is a ubiquitous language which is formed by close cooperation between domain experts (here is where the name comes from) and developers.
Nowadays many web site allow us to login to their site with facebook, linkedin etc. so when we click on facebook image then we redirected to facebook login page where we provide our facebook credential. if credential is right then facebook redirect us to first site. the advantage is we do not have to create & remember many credentials rather remember one.
but i do not know what is open id and how it works? i read this article http://www.devcurry.com/2012/11/aspnet-mvc-4-external-login-using-openid.html
it seems that in case of both open id and oauth user create their login to external site and user use that credential to other web site to login. if it is right then oauth and open id both are same and doing same purpose. so where is the difference?
please discuss how open id is different from oauth in terms of flow ?
In general, OpenID is about authentication(proving who you are (a.k.a identity)), OAuth is about authorization (to grant access to files/resource/data without having to deal with the original authentication). There's another thing called OpenID Connect which does both.
openid is authentication system and oauth is authorization system because in case of stackoverflow access both does the same thing.
No. they're not the same. Again, OAuth is basically a protocol that supports authorization workflows. What this means is that it gives you a way to ensure that a specific user has permissions to do something and that’s it.
OAuth isn’t meant to do stuff like validate a user’s identity — that’s taken care of by an Authentication service (e.g login with Facebook, Google, any other form of OpenID credentials or your own custom authentication service). Authentication is when you validate a user’s identity (like asking for a username / password to log in) -- that's what an OpenID, whereas authorization is when check to see what permissions an existing user already has.
I am using WCF Service to get data from Entity Framework, I am getting the following error while I am trying either trying to get data from service or while converting the returned data into jSon, its a huge list with more than 200K records each record might be of size 20 columns.
public ActionResult FDER_Read([Kendo.Mvc.UI.DataSourceRequest] Kendo.Mvc.UI.DataSourceRequest request)
using (ReportsClient reportclient = new ReportsClient())
var data = reportclient.GetFDER(GetCurrentFiscalPeriod(), GetCurrentUser());
var result = new ContentResult();
serializer.MaxJsonLength = Int32.MaxValue;
result.Content = serializer.Serialize(data.ToDataSourceResult(request));
result.ContentType = "application/json";
catch (Exception ex)
I have set the bindings to support max values I am not sure what am I missing?
Here is my ASP.Net MVC applications Web Config
The delete button is used to delete any additional / unwanted rows created in dynamically generated row in GridView.
Since the commandField delete button was replaced, the VB the engineers the delete action is now throwing an error: Unable to cast object of type 'System.Web.UI.WebControls.TemplateField' to type 'System.Web.UI.WebControls.CommandField'
Does anyone know how to modify this to reflect the button control ID used in markup instead of CommandField?
Protected Sub GrvSource_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.Header Then
If e.Row.RowIndex = -1 Then
DirectCast(DirectCast(e.Row.Cells(4), DataControlFieldCell).ContainingField, CommandField).ShowDeleteButton = False
If Convert.ToInt32(ViewState("rowIndex" & 0)) = e.Row.RowIndex Then
DirectCast(DirectCast(e.Row.Cells(4), DataControlFieldCell).ContainingField, CommandField).ShowDeleteButton = True