|
Yes but my Company has the license not me, hence the problem Rick (do you go with Rick or Richard)
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Hi,
I could able to get up to here so far but the val or text functions are not working on those items. Here is the below code I did,
var dataSource = $("#budgetdGrid").data("kendoGrid").dataSource;
var data = dataSource.data(); // or this.view();
for (var i = 0; i < data.length; i++) {
alert(data[i][0].val());
}
But the alert(data[i][0].val()); is throwing error, I tried with text also, that one also is throwing errors saying that those functions are not supported etc. budgetdGrid is the Kendo Grid, and the first element of that (I mean index) 0 is dropdown list selected text I want to get, for all the rows, I am looping through rows correctly here that the number of rows 8 are matching with what I have in Grid, but I am not able to get the selected items text value.
Any help would be greatly helpful, thanks in advance.
I have tried in the following way also, but its pulling out only the value but not the selected text, I need the selected text rather than value because I need to compare with text but not with the value:
$("#doeGrid").find("#budgetdGrid tbody").find('tr').each(
function () {
var id = $(this).find("input[id^='inputLine_']").val();
var txt = $(this).find("input[id^='inputLine_']").text();
alert(id);
alert(txt)
if (id == lin_val && lin_val != "" && id != "") {
prev_line.push(id);
}
});
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 21-Mar-18 14:19pm.
|
|
|
|
|
I have a gridview with a score column (4).
I am trying to get the total score.
Thanks anyone..please
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID,EP,supEmail" DataSourceID="SQLDuties" OnPreRender="GridView1_PreRender" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" Visible="False" />
<asp:TemplateField HeaderText="Duties" SortExpression="Duties">
<EditItemTemplate>
<asp:Label ID="EditDuties" runat="server" Text='<%# Bind("Duties") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Duties") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Agreed" SortExpression="Agreed">
<EditItemTemplate>
<asp:Label ID="EditTargets" runat="server" Text='<%# Bind("Agreed") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Agreed") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Score (1-5)" SortExpression="Score">
<EditItemTemplate>
<asp:TextBox ID="txtScore" runat="server" Text='<%# Bind("Score") %>' TextMode="Number"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVScore" runat="server" ErrorMessage="Score Require" ControlToValidate="txtScore" ForeColor="red"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator2" runat="server" ErrorMessage="1 to 5" MaximumValue="5" MinimumValue="1" ControlToValidate="txtScore" ForeColor="red"></asp:RangeValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Score") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Comment" HeaderText="Comment" SortExpression="Comment" />
<asp:BoundField DataField="EP" HeaderText="EP" SortExpression="EP" Visible="False" />
<asp:BoundField DataField="supEmail" HeaderText="supEmail" SortExpression="supEmail" Visible="False" />
</Columns>
<EmptyDataTemplate>
<br />
</EmptyDataTemplate>
</asp:GridView>
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
int total = 0;
if (e.Row.RowType == DataControlRowType.DataRow)
{
total = total + Convert.ToInt32( e.Row.Cells[4].Text.ToString());
}
Response.Write(total.ToString());
}
|
|
|
|
|
e.Row.Cells[4].Text will only work for BoundField Columns. For accessing TemplateFields , you need to use FindControl() method. For example:
var score = ((Label)e.Row.Cells[4].FindControl("Label3")).Text;
|
|
|
|
|
I am hoping someone can explain to me the rationale behind the Page.RegisterStartupScript method... What does it achieve that simply writing your script to a Literal doesn't? I've never had a reason to use it - if I want to add JavaScript to a page I simply do that. I am no doubt being very silly, but..
|
|
|
|
|
It ensures the script is only registered once.
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
|
|
|
|
|
OK... so if you have multiple user controls with scripts in then, yes, I see that makes sense. Otherwise though... (and I generally place my literal at the bottom of the page anyway )
Ta.
|
|
|
|
|
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?
|
|
|
|
|
|
Hi Vincent,
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.
|
|
|
|
|
Maybe you could look at quartz.net
and
Hangfire
|
|
|
|
|
i read a article on DDD and also read one on onion architecture from csharpcorner. some how i felt both are same but have different name only.
please some one let me know your thought. if there is any difference then please mention in details. thanks
|
|
|
|
|
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.
|
|
|
|
|
I think its same, but I am not very sure about it.
|
|
|
|
|
i am familiar with OAuth but not with open id.
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 ?
|
|
|
|
|
|
i have seen a forum stackoverflow where user can login with openid and oauth to post their question.
in both case 3rd party validate user and send a token to stackoverflow to get access.
so how we can say openid is authentication system and oauth is authorization system because in case of stackoverflow access both does the same thing.
looking for further discussion. thanks
|
|
|
|
|
Mou_kol wrote: 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.
It just that SO is an OpenID provider and as well as an OAuth2 Consumer: Stack Exchange is an OpenID Provider - Stack Overflow Blog[^]
|
|
|
|
|
Is there any Architecture similar to asp.net boilerplate?
|
|
|
|
|
How to process master detail JSON with WCF?
I would like to know, is there any guide on how to create WCF to process master detail JSON and insert it into SQL Server database?
|
|
|
|
|
How to Use Entity Framework Code?
|
|
|
|
|
Start by studying the documentation and online tutorials.
|
|
|
|
|
|
Hi,
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())
{
CommonFunctions.IgnoreCertificationErrors();
try
{
var data = reportclient.GetFDER(GetCurrentFiscalPeriod(), GetCurrentUser());
var serializer = new JavaScriptSerializer();
var result = new ContentResult();
serializer.MaxJsonLength = Int32.MaxValue;
result.Content = serializer.Serialize(data.ToDataSourceResult(request));
result.ContentType = "application/json";
return result;
}
catch (Exception ex)
{
throw 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
<binding name="CustomBinding_IReports" closeTimeout="00:25:00" openTimeout="00:25:00" receiveTimeout="00:25:00" sendTimeout="00:25:00"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" >
<security defaultAlgorithmSuite="Default" authenticationMode="SspiNegotiated"
requireDerivedKeys="true" includeTimestamp="true" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10"
requireSignatureConfirmation="false">
<localClientSettings detectReplays="true" />
<localServiceSettings
replayCacheSize="800000"
detectReplays="true"
replayWindow="00:05:00" />
</security>
<textMessageEncoding>
<readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/>
</textMessageEncoding>
<httpsTransport maxReceivedMessageSize="2147483647" authenticationScheme="Negotiate"
maxBufferPoolSize="2147483647" maxBufferSize="2147483647" />
</binding>
Here is my WCF Service Web Config
<binding name="crsSecureHttpBinding"
maxConnections="100"
closeTimeout="00:30:00"
openTimeout="00:30:00"
receiveTimeout="00:30:00"
sendTimeout="00:30:00"
transactionFlow="false"
transferMode="Buffered" maxDepth="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" >
<transactionFlow />
<security>
<localServiceSettings replayCacheSize="8000000" replayWindow="00:30:00" />
</security>
<textMessageEncoding>
<readerQuotas maxDepth="32" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646"/>
</textMessageEncoding>
<httpsTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" authenticationScheme="Negotiate" />
</binding>
The size of the returned object is: 96479088 and number of records are: 196411
I am not understanding what am I missing. I defined the Service and End point behaviors, any help would be greatly helpful, thanks in advance - please.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 7-Mar-18 19:54pm.
|
|
|
|