|
Make sure you're specifying Content-Disposition: attachment so that they get the "open/save" dialog instead of opening the document within the browser.
For IE users, you can also send X-Download-Options: noopen in the headers to hide the "Open" button, which should force them to save the file.
http://blogs.msdn.com/b/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Quote: How to test load of a web service.
I have developed a web service that handles user login information,and after login it transfers huge data from one server to another server like daily 1 lakh records or more daily from one user.I want to test how much load it can take for transferring data from one server to another server.The application can have only 100 login users but data transfer is big. so i am worried about data transfer when all users login at same time and transfers data at the same time. Plz help me. I want
|
|
|
|
|
Please edit this question and remove all the encoding so it shows as plain text.
|
|
|
|
|
|
|
If I have a form/view that will display 1 or more partial views based on user responses. Where do I need to place the AntiForgeryToken? In the parent view? In the partial views? Both?
Currently, I have it in the partial views, but we are occasionally getting an error:
Type:System.Web.Mvc.HttpAntiForgeryException
Message:A required anti-forgery token was not supplied or was invalid.
The error is reported in production only, we are unable to reproduce it on developer machines (typical).
My theory is that when multiple partial views are represented a mismatch of tokens occurs and the error is reported. My thinking is to move the token to the main/parent view.
Am I on the right track? Anybody had to deal with something similar?
Thanks in advance for the feedback.
|
|
|
|
|
Hello,
The site I am working on gets its data from small XML files (a few KB) that are refreshed every minute by external tools.
Knowing that multiple users will view pages, I think the best way would be to put them as static XmlDocument objects.
private XmlDocument bodyStatuses = new XmlDocument (myfile));
My first question is: knowing that the file will be refreshed on a regular basis, when is the "new" object actually created (pointing to the new version of the file, with new handle, etc..) ?
Can I safely assume that ASP manages that for me ?
Second question, in the same vein. When I use the same XmlDocument in multiple instances of a user control placed on the same page, could I also put my XML file as static in the user control ? so that it is only opened once (1st user control), and read once per user control ?
I am OK in C#, but new to ASP, so I don't know how such things are handled internally, and I would not want to hinder performances with bad coding habits
Thanks in advance.
|
|
|
|
|
Hi All,
I develop an ASP.Net Web Application that handle the daily work requests such as vacations, overtime, Leave Work, etc....
This process as the following:
1. the employee request from his account a vacation request.
2. the manager see this request and can approve or reject it.
My need when the user insert his request I want to send an auto-alert (Notification) like messenger alert for the manager,
Is it possible by the asp.Net (web application).
How can I do that?
Thank You.
|
|
|
|
|
If you want the server to push messages to the client, SignalR[^] is probably the best place to start.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Respected Sir, I want to send an sms through ASP.Net Without any Gateways . So please Send me the Source code to send free Sms....
Thanking you
Yours faithfully
(SharathMadhav)
|
|
|
|
|
|
Hi ,
Can we write a pure JSON REST service using classic ASP ?. My client requirement is to write it in classic ASP not .net. Could you please help.
Regards
Subin
|
|
|
|
|
Subin Mavunkal wrote: My client requirement is to write it in classic ASP not .net.
Unless they've given you a very good reason for that requirement, my suggestion would be to find another client.
"Classic" ASP is a dead technology. It's been dead for 12 years. Any client who demands that you write your code in a dead technology is not someone you want to deal with.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I was thinking the same. But I am just an employee here and the decision makers are non-technical guys 
|
|
|
|
|
|
hi all,
I am using a GridView in my aspx page I want make the fields editable or non editable depending upon a field in page Code behind and another thing is that the bound column is also not getting values that I am assigning for code behind. Can anybody please look into my code and let me know, where am I doing mistake.
Please help me by giving suggestion where am I doing mistake or by showing any link for example. I am also researching regarding this. Any kind of help is appreciated. thanks in advance. For assigning values both the "" and '' aren't working I don't know why?
Here is my aspx html code:
<asp:GridView ID="gv1" runat="server" AutoGenerateColumns="False"
OnRowEditing="gv1_RowEditing" OnRowCancelingEdit="gv1_RowCancelingEdit"
OnRowUpdating="gv1_RowUpdating" CellPadding="4" ForeColor="#333333">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="RecipientAgency" HeaderText="Recipient Agency" InsertVisible="False"
ReadOnly="True" SortExpression="RecipientAgency" />
<asp:TemplateField HeaderText="Carry Over Year" InsertVisible="False" SortExpression="CarryOverYear">
<EditItemTemplate>
<asp:TextBox ID="txtCarryOverYear" runat="server" Visible="<%# IsInEditMode %>" Text='<%# Bind("CarryOverYear") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblCarryOverYear" runat="server" Visible='<%# !(bool) IsInEditMode %>' Text='<%# Bind("CarryOverYear") %>'></asp:Label>
<asp:TextBox ID="txtCarryOverYear" runat="server" Visible="<%# IsInEditMode %>" Text='<%# Bind("CarryOverYear") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Diverted Year" InsertVisible="False" SortExpression="DivertedYear">
<EditItemTemplate>
<asp:TextBox ID="txtDivertedYear" runat="server" Visible='<%# IsInEditMode %>' Text='<%# Bind("DivertedYear") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDivertedYear" runat="server" Visible='<%# !(bool) IsInEditMode %>' Text='<%# Bind("DivertedYear") %>'></asp:Label>
<asp:TextBox ID="txtDivertedYear" runat="server" Visible='<%# IsInEditMode %>' Text='<%# Bind("DivertedYear") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Jul" SortExpression="Jul">
<EditItemTemplate>
<asp:TextBox ID="txtJul" runat="server" Visible='<%# IsInEditMode %>' Text='<%# Bind("Jul") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblJul" runat="server" Visible='<%# !(bool) IsInEditMode %>' Text='<%# Bind("Jul") %>'></asp:Label>
<asp:TextBox ID="txtJul" runat="server" Visible='<%# IsInEditMode %>' Text='<%# Bind("Jul") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<EditRowStyle BackColor="#999999" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>
And Here is my code behind code that tries to manipulate the gridview appearance and values:
public partial class MonthlyPerformance : System.Web.UI.Page
{
protected bool IsInEditMode=false;
protected void gv1_RowEditing(object sender, GridViewEditEventArgs e)
{
IsInEditMode = true;
var temp = ((TextBox)gv1.Rows[e.NewEditIndex].FindControl("txtCarryOverYear"));
var t=temp.Visible;
}
protected void gv1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
IsInEditMode = false;
e.Cancel = true;
}
protected void Page_Load(object sender, EventArgs e)
{
LoadList();
}
protected void gv1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
}
private void LoadList()
{
string strSQL;
DataSet ds = null;
IDataReader dr = null;
double Total = 0;
DataSet dsByHand = new DataSet();
dsByHand.Tables.Add();
dsByHand.Tables[0].Columns.Add("RecipientAgency");
dsByHand.Tables[0].Columns.Add("CarryOverYear");
dsByHand.Tables[0].Columns.Add("DivertedYear");
dsByHand.Tables[0].Columns.Add("Jul");
dsByHand.Tables[0].Columns.Add("Aug");
dsByHand.Tables[0].Columns.Add("Sep");
dsByHand.Tables[0].Columns.Add("Oct");
dsByHand.Tables[0].Columns.Add("Nov");
dsByHand.Tables[0].Columns.Add("Dec");
dsByHand.Tables[0].Columns.Add("Jan");
dsByHand.Tables[0].Columns.Add("Feb");
dsByHand.Tables[0].Columns.Add("Mar");
dsByHand.Tables[0].Columns.Add("Apr");
dsByHand.Tables[0].Columns.Add("May");
dsByHand.Tables[0].Columns.Add("Jun");
dsByHand.Tables[0].Columns.Add("TotalProductProduced");
dsByHand.Tables[0].Columns.Add("TransfToState");
dsByHand.Tables[0].Columns.Add("Adjustment");
dsByHand.Tables[0].Columns.Add("EndingBalance");
var tempr = dsByHand.Tables[0].NewRow();
tempr.ItemArray[0] = "Test Temp";
dsByHand.Tables[0].Rows.Add(tempr);
gv1.DataSource = dsByHand.Tables[0];
gv1.AutoGenerateColumns = false;
gv1.DataBind();
}
}
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
hi,
dsByHand.Tables[0].Columns.Add("RecipientAgency");
dsByHand.Tables[0].Columns.Add("CarryOverYear");
dsByHand.Tables[0].Columns.Add("DivertedYear");
dsByHand.Tables[0].Columns.Add("Jul");
dsByHand.Tables[0].Columns.Add("Aug");
dsByHand.Tables[0].Columns.Add("Sep");
dsByHand.Tables[0].Columns.Add("Oct");
dsByHand.Tables[0].Columns.Add("Nov");
dsByHand.Tables[0].Columns.Add("Dec");
dsByHand.Tables[0].Columns.Add("Jan");
dsByHand.Tables[0].Columns.Add("Feb");
dsByHand.Tables[0].Columns.Add("Mar");
dsByHand.Tables[0].Columns.Add("Apr");
dsByHand.Tables[0].Columns.Add("May");
dsByHand.Tables[0].Columns.Add("Jun");
dsByHand.Tables[0].Columns.Add("TotalProductProduced");
dsByHand.Tables[0].Columns.Add("TransfToState");
dsByHand.Tables[0].Columns.Add("Adjustment");
dsByHand.Tables[0].Columns.Add("EndingBalance");
here you are adding the column name only.It doesn't contains any values in it.you cannot edit without the value
refer this:
Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List[^]
To learn all there is to know. I know I'll be disappointed one day, but I've made a good start, and the eventual disappointment is likely to be brief.
-Roger Wright
|
|
|
|
|
Hi Friends,
I'm new to paypal, one of my application is integrated with paypal(testing site ie, sandbox). I need to use the actual live URL in the application with new live account.
For creating new account: Do i need to create directly business account or developer account and then business account?
|
|
|
|
|
You have your customer open a PayPal account, and then they give you the login credentials to transmit a payment processing request.
Your customer will have to agree to the terms and conditions of the account, and enter their checking account information for fee's to be deducted from, and money to be deposited to. Plus they must comply to the pay pal version of morality as well, no porn, guns, pawn shops, bullets, the list goes on an on.
You test your code in your sandbox that you signed up for.
|
|
|
|
|
|
i've tested my site with sandbox url, it is working fine.
Now client wants to create an account. Which type of account he has to create?
Developer or Business?
|
|
|
|
|
You want a business account. That way they can actually process real transactions.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
My client has commissioned a project to create a custom eshop. This project has a lot of customization to be done if i use a ready solution (Nopcommerce etc). Also the list of products will be great. Which platform do you recommend for such a project? Basically I want to do customization of both the frontend and the backend.
Thank you
|
|
|
|
|
|
I have experience with asp.net, but not with ecommerce solution. Performance of nopcommerce?
|
|
|
|