For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
For example, if you have a UserControl, you could have multiple instances of it on the page. Writing the script to a literal would output one copy of the script for each instance of the control, whereas RegisterStartupScript would (normally) only output one copy.
It also ensures that the script is rendered at the bottom of the form, rather than scattered throughout the markup. Not a huge issue, but very satisfying if you have OCD.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
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?
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.
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
I have a markup page that was using CommandField delete button. This was later replaced with regular button control.
<table><tr><td><asp:gridviewID="Gridview1"RowStyle-Wrap="false"gridlines="None"CssClass="responsiveTable1"runat="server"ShowFooter="true"AutoGenerateColumns="false"OnRowDeleting="Gridview1_RowDeleting"><Columns><asp:BoundFieldDataField="RowNumber"Visible="false"HeaderText="Row Number"/><asp:TemplateFieldHeaderText="Name"><headerstylehorizontalalign="Left"/><ItemTemplate><asp:TextBoxID="txtsourcename"placeholder="Name...(e.g, Jane Doe)"runat="server"style="width:375px;"AutoPostBack="true"class="form-control textClass"OnTextChanged="txtsourcename_TextChanged"></asp:TextBox><br/><asp:CheckBoxID="grid1Details"ClientIDMode="Static"runat="server"Checked="false"AutoPostBack="true"OnCheckedChanged="Grid1CheckChanged"/><spanstyle="color:#ff0000">*Check this box if N/A</span></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Address"><ItemStyleHorizontalAlign="Left"></ItemStyle><ItemTemplate><asp:TextBoxID="txtsourceaddress"placeholder="Address..."runat="server"style="width:375px;"class="form-control textClass"></asp:TextBox><br/><br/></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText=""><ItemTemplate><asp:ButtonID="ButtonAdd"runat="server"Text="Add"onclick="ButtonAdd_Click"CssClass="grvAddButton"/><br/><br/><br></ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText=""><ItemTemplate><asp:ButtonID="sourceDelete"runat="server"Text="Delete"CommandName="Delete"CssClass="grvDelButton"OnClientClick="return confirm('Are you sure you want to remove this row?')"/><br/><br/><br/></ItemTemplate></asp:TemplateField><%-- <asp:CommandField ShowDeleteButton="True"><ControlStyle CssClass="grvDelButton" /></asp:CommandField>--%></Columns></asp:gridview></td></tr></table>
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