|
Check the maxRequestLength in the config file.
"One negative with increasing the size of a file that can be uploaded is that there are hackers out there who attack servers by throwing a large number of requests at them. To guard against this, you can actually decrease the size of the files that are allowed to be uploaded; otherwise, you may find hundreds or even thousands of 10 MB requests hitting your server."
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i want insert a recored in sql that one field is datetime type, i write this code but it has error , do u know why?
string insertCommand =
insert into Paper_Ajance (Paper_ID,Request,Paper_Date) values ('111','True',@MyParam);
using (SqlConnection cnn = new SqlConnection(ConnectionString))
{
using (SqlCommand cmm = new SqlCommand())
{
cnn.Open();
cmm.Connection = cnn;
cmm.CommandText = insertCommand;
SqlParameter param = new SqlParameter();
param.ParameterName = "@MyParam";
param.Value = DateTime.Now;
cmm.Parameters.Add(param);
cmm.ExecuteNonQuery();
}
}
|
|
|
|
|
ptvce wrote: but it has error
Don't you think telling us what the error is would be helpful?
Also, please format your code snippets appropriately. Read the forum guidelines. If you following the guidelines you are more likely to receive help.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
ptvce wrote: string insertCommand =
insert into Paper_Ajance (Paper_ID,Request,Paper_Date) values ('111','True',@MyParam);
For now, the first error in your code is - you have not put the insertCommand string in double quotes!
If you read forum guidelines properly, posting your code/question correctly would get you expected response.
Update your question, format it correctly, post error if you face it after using 'double quotes' around insert command string.
One more thing, do try to define the Parameter type as DateTime (assuming database too has a defined Datetime field)
|
|
|
|
|
hi
I need sign out code in my asp.net project
How can I create that
|
|
|
|
|
Please read the guidelines of this forum and abide by them. Namely don't post the same question twice.
You need to stop spamming the forum with easily answered questions and actually pickup a book (and read it).
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Asking for code is not the right way to post.
For signout, you don't need to create anything. You just need an event where you clear out all login related details such that one cannot log back in after doing a signout (until user re-logins!)
Try first!
|
|
|
|
|
hi
I need sign out code in my asp.net project
How can I create that?
|
|
|
|
|
Well, definitely not by posting the same request twice.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
And not by responding to the duplicate post so it can't be deleted.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Oops.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hai All,
I have a gridview and some datas are bind to that grid.There is a template button in the grid called"Click" and if I click the "Click" field the the corresponding row datas are displayed in a below that grid.There is a Save and Next button below this and if I press the Next button I want to display the next record from the grid to the . Is anybody can help me this regard
Thanks
Denny
|
|
|
|
|
try to do some coding. if you get any errors post here. we can help you.
|
|
|
|
|
Is it possible to have
<asp:Repeater ID="rptItemTotAmount" runat="server">
<ItemTemplate>
<asp:Table ID="tblItemListt" runat="server" Font-Size="Small">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Right"><%# DataBinder.Eval(Container.DataItem, "TotalAmount","<strong>Total: </strong>{0:c}") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
kind of code in .ascx.cs page rather than .ascx page.
suchita
|
|
|
|
|
Yes, but why would you?
You can handle the OnDataBind event of the repeater and assign the value to the cell.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I need to implement that concept to get output related with iTextSharp. Can you refer me to the related examples link so that I can get some idea ? Please.
well currently I am implementing repeater OnitemDataBound but I still dont have any idea how where shall i keep
<asp:Repeater ID="rptItemTotAmount" runat="server">
<ItemTemplate>
<asp:Table ID="tblItemListt" runat="server" Font-Size="Small">
<asp:TableRow>
<asp:TableCell HorizontalAlign="Right"><%# DataBinder.Eval(Container.DataItem, "TotalAmount","<strong>Total: </strong>{0:c}") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
in ascx.cs page?
suchita
modified on Friday, September 3, 2010 2:39 PM
|
|
|
|
|
string szMyString = "<html></html>"; ?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thank you for the reply. I did using like this:
string html = @"<html> </html>";
But when i insert
<asp:Repeater ID="rptItemTotAmount" runat="server">
<ItemTemplate>
<asp:Table ID="tblItemListt" runat="server" Font-Size="Small"> <asp:TableRow>
<asp:TableCell HorizontalAlign="Right"><%# DataBinder.Eval(Container.DataItem, "TotalAmount","<strong>Total: </strong>{0:c}") %></asp:TableCell>
</asp:TableRow>
</asp:Table>
</ItemTemplate>
codes, it didn't take. So is it possible to send this codes also in ascx.cx page ?
suchita
|
|
|
|
|
Hi
I don't know how to run asp page in Vs2005.I have one application which contain some asp page and i want to do some modification in that page and want to test or debug.
how it possible ..or on wchich othe platform i can debug my asp page
Thanks
|
|
|
|
|
|
Hi All,
i Have made a web application, working fine in WINDOWS and MAC, but in my application i have a file upload option by which, user can select file and upload it on server.
For this i use openfiledialog to select files and use filter to filter only allowed file types in selection.
the filter is like :
dlg1.filter=Files Allowed(*.pdf;*.doc;*.docx;*.txt;*.xls;*.xlsx;*.ppt;*.pptx;*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png)|*.pdf;*.doc;*.docx;*.txt;*.xls*;*.xlsx;*.ppt;*.pptx;*.bmp;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png"
Now it is working fine but
in MAC i m unable to pick excel files, excel files not available in allowed types, all though .xls and .xlsx is been added into filter and working for windows.
so what changes required in filter for MAC machine.
Thanks
Yogesh Agarwal
|
|
|
|
|
yogesh_kumar_agarwal wrote: docx;*.txt;*.xls*;*.xlsx;*.ppt
In your filter, its written: *.xls*;
I guess, it should be: *.xls;
|
|
|
|
|
|
Cool.
|
|
|
|
|
I want to send mail from an asp page. The asp page is called from a html page. The sending mail using CDOSYS and CDO is not working properly. When i call the asp page from html page, the script for sending mail in the asp page is getting displayed while running rather than working of the process which i had mentioned in the script to work.
The runtime problem is that, when the asp file is being called from html file the script is getting displayed rather than the process to get worked.
HTML Code
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
<body>
<form action=sendmail.asp method="POST">
<p><input type="text" name="T1" size="20"></p>
<p><input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
ASP File "sendmail.asp" code
*****************************
HTML and CSS Syntax (Toggle Plain Text)
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<%
function sendmail()
{
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="rksvidhya@yahoo.com"
myMail.To="swornavidhya.mahadevan@gmail.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtsperver") = "smtp.gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")= 1;
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = "true";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusername") = "swornavidhya.mahadevan@gmail.com";
myMail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "************";
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing
response.write("<script> alert('Process Successful.')</script> ");
}
%>
</head>
<body>
</body>
</html>
Kindly help me at the earliest.
M.Sworna Vidhya
|
|
|
|