|
Thank you so much for your response and help. I am sorry to inform, that i have tried using the '&&' operator but I am still getting the same 401 error, when logging in using full query user details.
i would like to ask, if their is certain parameter and method, i should be looking into while debugging the code.
I really appreciated your help. please advise.
Many thanks.
|
|
|
|
|
then test those two repository.trail / repository.unlim functions. At least one of them has a bug.
|
|
|
|
|
Thank you for your feedback. i am stuck on little status code issue, regarding this long problem. When I debug the full and trial repository, while login as 'trail' user, 'resp' variable below is highlighted as red with a 404 status code, but on the fiddler testing environment, it displays the url as 401 unauthorized issue.
ClaimRole user = repository.trial(credentials[0], credentials[1]);
ClaimRole user2 = repository.full(credentials[0], credentials[1]);
if (user == null || user2 == null)
{
var resp = new HttpResponseMessage(HttpStatusCode.NotFound)
{
Content = new StringContent(string.Format("access denied")),
};
}
else
{
<br />
resp -- {StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
Hence I am little unclear, which error to look into. if you get time, could you please advice on any material i should look into or concentrate on.
Many thanks for your time and help.
|
|
|
|
|
As of now,Popup in a page asks for password and onclick jquery ajax method calls webmethod, which returns the actual password of the user for validation.
But if a press F12,the password gets viewed as response .
Note:- After buttonclick, page needs to redirect to the same page.
|
|
|
|
|
Never send a password back to the client. The program should send the user's input to the server side for validation. Not the other way round.
|
|
|
|
|
Apart from the fact that you shouldn't be sending the user's password to an unauthenticated client, you shouldn't be able to send the user's password, ever.
Passwords should NEVER be stored in plain text.
You should be storing a salted hash of the password. When you need to verify the entered password, you apply the same salting and hashing algorithm to the entered password, and compare the result to the stored salted hash of the real password.
See Salted Password Hashing - Doing it Right[^] for more information.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi All,
I am trying to write repeater values in to Excel file, it is writing something but it not writing clearly. Can anybody please help where am I doing mistake. Another problem is repeater control has text boxes and td values. Initially I couldn't write into excel because of text boxes then I did this work around but didn't give me the solution I want.
Here is my code:
protected void ExportToExcel(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.AddHeader("Content-Disposition", "attachment;filename=" + ConfigurationManager.AppSettings["ExcelFilePath"].ToString() +
ddlProductId.Text + "_" + ddlProcessor.Text + ".xls");
Response.Charset = "";
this.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
HtmlForm frm = new HtmlForm();
this.Page.Controls.Add(frm);
frm.Attributes["runat"] = "server";
frm.Controls.Add(this.rptMonthlyReport);
frm.RenderControl(oHtmlTextWriter);
rptMonthlyReport.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{ }
public override bool EnableEventValidation
{
get { return false; }
set { }
}
Then I have out put displayed as below. Please help me in this regard. Any help link or code snippet or a suggestion would help me a bit. Thanks in advance.
input type+AD0AIg-hidden+ACI- name+AD0AIgBfAF8-VIEWSTATE+ACI- id+AD0AIgBfAF8-VIEWSTATE+ACI- value+AD0AIgAi- /+AD4- +ADw-/div+AD4- +ADw-header+AD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-Label3+ACI- class+AD0AIg-FormHead2+ACIAPg-Monthly Performance Report Tracking+ADw-/span+AD4- +ADw-/header+AD4- +ADw-table width+AD0AIg-100+ACUAIg- id+AD0AIg-tblMonthlyReport+ACI- cellspacing+AD0AIg-2+ACI- border+AD0AIg-1+ACIAPg- +ADw-tr+AD4- +ADw-td class+AD0AIg-ColHeading+ACIAPg-Recipient Agency+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAOwAiAD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-lblCarryOverQty+ACI- class+AD0AIg-ColHeading+ACI- style+AD0AIg-display:inline-block+ADs-width:99+ACUAOwAiAD4-SY 2012-13+ADw-br /+AD4- Carry +ADw-br /+AD4-Over Pounds+ADw-/span+AD4APA-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAOwAiAD4- +ADw-span id+AD0AIg-rptMonthlyReport+AF8-lblDivertedQty+ACI- class+AD0AIg-ColHeading+ACI- style+AD0AIg-display:inline-block+ADs-width:99+ACUAOwAiAD4-Pounds +ADw-br /+AD4-Diverted for+ADw-br /+AD4-SY 2013-14+ADw-/span+AD4APA-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jul+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Aug+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Sep+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Oct+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Nov+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Dec+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jan+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Feb+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Mar+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Apr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-May+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-true+ACI- style+AD0AIg-width: 4+ACUAIgA+-Jun+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm Sponr To State+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm State To Sponr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 6+ACUAOw- flex-wrap: wrap+ADsAIgA+-Qty Trans Frm Sponr To Sponr+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- nowrap+AD0AIg-false+ACI- style+AD0AIg-width: 4+ACUAIgA+-Total+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 4+ACUAOw- flex-wrap: wrap+ADsAIgA+-Prior Yr Left Over+ADw-/td+AD4- +ADw-td class+AD0AIg-ColHeading+ACI- style+AD0AIg-width: 2+ACUAOw- flex-wrap: wrap+ADsAIgA+-Ext Ind+ADw-/td+AD4- +ADw-/tr+AD4- +ADw-tr class+AD0AIg-OddRow+ACI- width+AD0AIg-95+ACUAIgA+- +ADw-td align+AD0AIg-left+ACI- style+AD0AIg-border: none+ADsAIgA+- +ADw-input name+AD0AIg-rptMonthlyReport+ACQ-ctl16+ACQ-Hidden1+ACI- type+AD0AIg-hidden+ACI- id+AD0AIg-rptMonthlyReport+AF8-Hidden1+AF8-0+ACI- value+AD0AIg-10001+ACI- /+AD4- Baker SD 5J +ADw-/td+AD4- +ADw-td id+AD0AIg-rptMonthlyReport+AF8-tdCarryOverQty+AF8-0+ACI- align+AD0AIg-right+ACI- style+AD0AIg-width: 4+ACUAIgA+- +ADw-input name+AD0AIg-rptMonthlyReport+ACQ-ctl16+ACQ-txtCarryOverQty+ACI- type+AD0AIg-text+ACI- value+AD0AIg-0.00+ACI- id+AD0AIg-
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Try this
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=namefile.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
rep.RenderControl(htmlWrite);
Response.Write("<table>");
Response.Write(stringWrite.ToString());
Response.Write("</table>");
Response.End();
|
|
|
|
|
Hi,
Thank you for your help, it is working fine but the alignments are not that good. Like a column is taking lot of space but the other is not.
And I think it is taking Text boxes as it is in the excel file, is there any way to make everything as normal text and write those values in to excel file as just normal text.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Do you have text-boxes in repeater? while exporting data to excel i think there should textbox instead of that labels or Literals should be there,
|
|
|
|
|
Yes I do have text box, they are editable text boxes. This client made me to create almost an online excel sheet man . Sorry I was kidding. But yes it has text boxes. And I can't get rid of them too because user will be entering values in Text boxes, then it is going to change the totals.
The problem with it is, it is always displaying a message and then in excel it is showing the text boxes as it is.
Is there any way to get rid of it? and make it as a plain excel.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Your repeater is always in edit mode...? Strange.
generally what happene. we display data in labels or literals and when we need to edit some record just click on edit button and it become editable.
Simple approach, in this way your export to excel will work absolutely fine.
|
|
|
|
|
No it is not editable all the times, but I didn't use labels at all, instead I made the text boxes enable=false when I don't want them to be enabled.
Isn't it correct approach? My repeater has lot of rows and columns so I didn't want to have more controls on it. Is there any other approach.
Here is my repeater html part, here I am using EnableEdit as property because it will be set when the report is getting loaded. Then depending upon users access level he will have either edit or view feature enabled for him. If I need to change anything in implementing your approach please let me know. It will help me a lot in terms of Excel import. Then below that I am putting the EnableEdit code.
<asp:Repeater ID="rptStateDrawDownsSplit" runat="server" OnItemDataBound="rptStateDrawDownsSplit_ItemDataBound">
<HeaderTemplate>
<header>
<asp:Label ID="Label4" runat="server" CssClass="FormHead2">State Account Tracking</asp:Label>
</header>
<table width="100%" id="tblStateAccountTracking" cellspacing="2" border="1">
<tr>
<td class="ColHeading">Recipient Agency</td>
<td class="ColHeading" nowrap="false" style="width: 6%;">
<asp:Label runat="server" CssClass="ColHeading" ID="lblCarryOverQty" Width="95%" />
</td>
<td class="ColHeading" nowrap="false" style="width: 6%;">
<asp:Label runat="server" CssClass="ColHeading" ID="lblDivertedQty" Width="95%" />
</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jul White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jul Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Aug White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Aug Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Sep White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Sep Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Oct White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Oct Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Nov White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Nov Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Dec White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Dec Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jan White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jan Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Feb White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Feb Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Mar White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Mar Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Apr White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Apr Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">May White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">May Dark</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jun White</td>
<td class="ColHeading" style="flex-wrap: wrap; width: 3%;">Jun Dark</td>
<td class="ColHeading" style="width: 6%; flex-wrap: wrap;">Qty Trans Frm Sponr To State</td>
<td class="ColHeading" style="width: 6%; flex-wrap: wrap;">Qty Trans Frm State To Sponr</td>
<td class="ColHeading" style="width: 6%; flex-wrap: wrap;">Qty Trans Frm Procsr To State</td>
<td class="ColHeading" nowrap="true" style="width: 4%">Total</td>
<td class="ColHeading" style="width: 4%; flex-wrap: wrap;">Prior Yr Left Over</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr class="OddRow" width="95%">
<td align="left" style="border: none;">
<%# DataBinder.Eval(Container.DataItem, "RecipientAgency") %>
</td>
<td align="left" style="border: none">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# String.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"CarryOverQty"))%>'
ID="txtCarryOverQty" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="left" style="border: none">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"DivertedQty")%>'
ID="txtDivertedQty" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JulWhite")%>'
ID="txtJulWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JulDark")%>'
ID="txtJulDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AugWhite")%>'
ID="txtAugWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AugDark")%>'
ID="txtAugDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"SepWhite")%>'
ID="txtSepWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"SepDark")%>'
ID="txtSepDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"OctWhite")%>'
ID="txtOctWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"OctDark")%>'
ID="txtOctDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"NovWhite")%>'
ID="txtNovWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"NovDark")%>'
ID="txtNovDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"DecWhite")%>'
ID="txtDecWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"DecDark")%>'
ID="txtDecDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JanWhite")%>'
ID="txtJanWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JanDark")%>'
ID="txtJanDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"FebWhite")%>'
ID="txtFebWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"FebDark")%>'
ID="txtFebDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MarWhite")%>'
ID="txtMarWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MarDark")%>'
ID="txtMarDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AprWhite")%>'
ID="txtAprWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AprDark")%>'
ID="txtAprDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MayWhite")%>'
ID="txtMayWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MayDark")%>'
ID="txtMayDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JunWhite")%>'
ID="txtJunWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JunDark")%>'
ID="txtJunDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmSponsorToState")%>'
Enabled="false" ID="txtQtyTransFrmSponsorToState" runat="server"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmStateToSponsor")%>'
Enabled="false" ID="txtQtyTransFrmStateToSponsor" runat="server"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmProcessorToState")%>'
Enabled="false" ID="txtQtyTransFrmProcessorToState" runat="server"></asp:TextBox>
</td>
<td align="right" id="tdTotal" runat="server" style="width: 4%"></td>
<td align="right" id="tdPriorYrLeftOver" runat="server" style="width: 4%">
<%# DataBinder.Eval(Container.DataItem, "PriorYearLeftOver") %>
</td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="EvenRow" width="95%">
<td align="left" style="border: none;">
<%# DataBinder.Eval(Container.DataItem, "RecipientAgency") %>
</td>
<td align="left" style="border: none">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# String.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"CarryOverQty"))%>'
ID="txtCarryOverYear" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="left" style="border: none">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# String.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"DivertedQty"))%>'
ID="txtDivertedYear" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JulWhite")%>'
ID="txtJulWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JulDark")%>'
ID="txtJulDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AugWhite")%>'
ID="txtAugWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AugDark")%>'
ID="txtAugDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"SepWhite")%>'
ID="txtSepWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"SepDark")%>'
ID="txtSepDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"OctWhite")%>'
ID="txtOctWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"OctDark")%>'
ID="txtOctDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"NovWhite")%>'
ID="txtNovWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"NovDark")%>'
ID="txtNovDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"DecWhite")%>'
ID="txtDecWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"DecDark")%>'
ID="txtDecDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JanWhite")%>'
ID="txtJanWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JanDark")%>'
ID="txtJanDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"FebWhite")%>'
ID="txtFebWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"FebDark")%>'
ID="txtFebDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MarWhite")%>'
ID="txtMarWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MarDark")%>'
ID="txtMarDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AprWhite")%>'
ID="txtAprWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"AprDark")%>'
ID="txtAprDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MayWhite")%>'
ID="txtMayWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"MayDark")%>'
ID="txtMayDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JunWhite")%>'
ID="txtJunWhite" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"JunDark")%>'
ID="txtJunDark" runat="server" Enabled="<%# this.EnableEdit %>"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmSponsorToState")%>'
Enabled="false" ID="txtQtyTransFrmSponsorToState" runat="server"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmStateToSponsor")%>'
Enabled="false" ID="txtQtyTransFrmStateToSponsor" runat="server"></asp:TextBox>
</td>
<td align="right" style="width: 6%">
<asp:TextBox Style="text-align: right" Width="99%" Text='<%# DataBinder.Eval(Container.DataItem,"QtyTransFrmProcessorToState")%>'
Enabled="false" ID="txtQtyTransFrmProcessorToState" runat="server"></asp:TextBox>
</td>
<td align="right" id="tdTotal" runat="server" style="width: 4%"></td>
<td align="right" id="tdPriorYrLeftOver" runat="server" style="width: 4%">
<%# DataBinder.Eval(Container.DataItem, "PriorYearLeftOver") %>
</td>
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
<tr class="ColHeading">
<td colspan="2">RUNNING TOTALS</td>
<td align="right" id="rtDiverted" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJulWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJulDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtAugWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtAugDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtSepWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtSepDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtOctWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtOctDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtNovWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtNovDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtDecWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtDecDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJanWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJanDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtFebWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtFebDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtMarWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtMarDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtAprWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtAprDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtMayWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtMayDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJunWhite" runat="server" nowrap="true">Test</td>
<td align="right" id="rtJunDark" runat="server" nowrap="true">Test</td>
<td align="right" id="rtQtyTransFrmSponsorToState" runat="server" nowrap="true">Test</td>
<td align="right" id="rtQtyTransFrmStateToSponsor" runat="server" nowrap="true">Test</td>
<td align="right" id="rtQtyTransFrmProcessorToState" runat="server" nowrap="true">Test</td>
<td align="right" id="rtTotal" runat="server" nowrap="true">Test</td>
<td align="right" id="rtPriorYrLeftOver" runat="server" nowrap="true"></td>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>
Here is the code to get EnableEdit value, it is stored in ViewState too to avoid more database calls. It seems from your previous message I am doing some small mistake which can improve my repeater control. Please help me, it will help me a lot. Thanks in advance friend.
if ((ViewState["EnableEdit"] == null))
{
int PrgId;
PrgId = int.TryParse(ProgId, out PrgId) ? PrgId : 0;
DataSet dsTemp = SqlHelper.ExecuteDataset(strConnectionString, CommandType.StoredProcedure, "pr_GetWebUserSponsorForUser",
new SqlParameter[] {
new SqlParameter("@UserId", SqlDbType.Int) { Value = UserId },
new SqlParameter("@ProgId", SqlDbType.Int) { Value = PrgId }
});
if ((dsTemp.Tables != null) && (dsTemp.Tables.Count > 0) && (dsTemp.Tables[0] != null) && (dsTemp.Tables[0].Rows != null)
&& (dsTemp.Tables[0].Rows.Count > 0) && (dsTemp.Tables[0].Rows[0] != null))
{
EnableEdit = ((dsTemp.Tables[0].Rows[0][0] != null) && !System.DBNull.Value.Equals(dsTemp.Tables[0].Rows[0][0])) ?
((dsTemp.Tables[0].Rows[0][0].ToString() == "1") ? true : false) : false;
ViewState["EnableEdit"] = EnableEdit;
SponsorId = ((dsTemp.Tables[0].Rows[0][2] != null) && !System.DBNull.Value.Equals(dsTemp.Tables[0].Rows[0][2])) ?
(int.TryParse(dsTemp.Tables[0].Rows[0][2].ToString(), out SponsorId) ? SponsorId : 0) : 0;
if (SponsorId > 0)
{
EnableEdit = false;
ViewState["SponsorId"] = SponsorId;
}
else
{
LoadSponsors();
ViewState["SponsorId"] = 0;
}
}
else
{
LoadSponsors();
EnableEdit = false;
ViewState["EnableEdit"] = EnableEdit;
ViewState["SponsorId"] = 0;
}
}
else
{
EnableEdit = (ViewState["EnableEdit"] == null) ? true : Convert.ToBoolean(ViewState["EnableEdit"]);
SponsorId = (ViewState["SponsorId"] == null) ? 0 : Convert.ToInt32(ViewState["SponsorId"]);
}
<pre>
<div class="signature">Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA</div>
|
|
|
|
|
And another thing about this issue is they didn't say anything about excel export in the beginning now they are asking it. That's another reason may be I didn't look for your option.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Hi All,
I am getting the following error when I am trying to deploy a web application into TFS server.
Here is the error message
Unable to cast object of type 'Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec' to type 'Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec'.
I have switched from "DefaultTemplate.xaml" to "DefaultTemplate.11.1.xaml" still the problem is same. Can anybody please advise what could be the problem or solution?
Any sort of help will be very helpful.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Hi all,
I haven't been on this forum for a few years now but as I now have a technical question, I have returned!
Basically, I am looking an online repository for all our images and videos etc that we use for our e-learning, publications and training materials. It has to be the kind of system whereby someone with administration privileges can login, create a category for a group of images, for example, “House fires” and then upload these to the server into a pre-designated folder. This system must also have a searchable database so that a user entering the “House, fires” etc will get a new display of thumbnails, let’s say 20 per screen and they will have the option of going to another screen if there are more than 20 images matching the original search criteria.
So, with this search function, would it be advisable to have some kind of form where only designated administrators can upload images/videos and then enter some keywords associated with each individual one and then these are transferred into a mySQL database?
When the user arrives at the screen with these thumbnails, if they click on one, then a larger image will appear and in the case of videos, they will have a play bar underneath whereby they can preview it and pause it when required. In both cases, there will be an interactive link where the file being previewed can be downloaded to the user’s hard-drive.
This repository of images/videos will be available to all the personnel in my company, they won’t be tracked and it will be accessed by a link from the main company website so therefore, each user with have a user name and password assigned to them.
This obviously has to go on our webserver which supports ASP.NET technology.
It is a windows 2003 server with IIS 6 and no php.
Now, I think there’s a solution with ASP.NET with a mySQL backend. BUT is there a solution with this database or xml with JQUERY?
What do you guys think?
I look forward to any technical solutions.
Best way to get hold of me, email:-
keith_trodden@yahoo.com
Thanks in advance.
Keith
|
|
|
|
|
I'm trying to understand the lifecycle of the AntiForgeryToken.
Let's say the user starts to enter a form, and then leaves for lunch before finishing the form. When the user started to enter data, the AntiForgeryToken cookie was created.
During their absence, the session times out and the user is returned to the login screen.
Now when they return from lunch, log back in, and return to the form they were previously entering / editing, is a new token created? Or, does it recognize that a token already exists and attempts to use it?
Can anybody confirm token re-use across session timeout?
My theory is that re-use is causing an error. Because when the user returns and accesses the web page, they are now accessing a new server in the load balance farm and this causes token validation to fail. Resulting in a System.Web.Mvc.HttpAntiForgeryException
Message:A required anti-forgery token was not supplied or was invalid.
|
|
|
|
|
I have been able to display a Chart that contains a Series that display Date on the X Axis and various Values on the Y Axis.
On the same chart, I now want to display rectangles. I have tried SeriesChartType.StepLine but the results I get are not what I expect.
Could someone please point me to a link or provide example C# code that would show how I display a rectangle?
|
|
|
|
|
Attach a sample screenshot in your question.
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
ability to display multiple pages. aspx in tabs or multiview on my website. net 2013
when clicking on the menu option "clients" on page 1 (listacliente.aspx) display
with a list of customers.
when clicking on a client display page2 (cliente.aspx) with the information in this
but the client list not delete
when clicking on "Edit Customer" page 3 (editarCliente.aspx) is displayed but without hiding the open pages.
is something like the controls like telerik, devespress, sencha, showing pages in tabs
this can be done only with. web NET 2013 without external controls.
possibility of having several pages open. aspx in internet explorer?
example: http://docs.sencha.com/extjs/4.2.2/extjs-build/examples/layout/complex.html
for expample : two pages in different tabs
|
|
|
|
|
You'll have to specify the target of the link if you don't want to use the default target (usually same tab). See a tag reference for more information.
Philippe Mori
|
|
|
|
|
good day
what I want is the user to open the pages. aspx and hold open
for example would allow you to open about 10 pages. APSX within tabs
to consult other information that does not need to close the pages for
you want to open
the user can keep multiple pages open
for example, product page, customers, employees, accounts, suppliers both
thanks
|
|
|
|
|
Hi,
I want to know approches to use http://flexpaper.devaldi.com/ in our asp.net project. I have tried but i am a little bit confused so please provide help to use this.
I want to know that it is free or not. that means is there needed to license for http://flexpaper.devaldi.com/ ?
Thank you
|
|
|
|
|
Why not ask them, it's their product?
|
|
|
|
|
How to display regression equation and R-squared value along with trendline in asp.Net Chart control.
|
|
|
|
|