|
Yes it will be bit tough to identify the performance problems. Do experiments with both methods, trace the results and check the execution timings. Also you can use any of the profilers available for .NET
|
|
|
|
|
Yes you are correct Navaneeth
|
|
|
|
|
Hi to All,
Here i am trying to upload multiple files on a server. This works fine for the files having size less than 4 to 5 MB, but whenever i trying to upload the file whos size is more than that it even does not take that file. Here i am using a List box to contain the files to be uploaded. the code for "add files" and "upload files" as follows....
//code for Add file Button
private void AddFile_Click(object sender, System.EventArgs e)
{
lblStatus.Visible=true;
lblStatus.Text="";
//call to HideControl()
HideControls(1);
bool b=true;
if (Page.IsPostBack == true)
{
listFileList.AutoPostBack=true;
// This function adds the selected files in the List Box.
// if the file is not selected then it dispalyes the error message.
// Check for the availability of the files in the FindFile control.
if (FindFile.Value!="")
{
if (listFileList.Items.Count!=0)
{
for (int i=0; i<listfilelist.items.count; i++)
="" {
="" b="true;
" if="" (findfile.postedfile.filename="=" convert.tostring(listfilelist.items[i]))
="" lblstatus.text="File already present in listbox" ;
="" break;
="" }
="" (b="=" true)
="" hif.add(findfile);
="" listfilelist.items.add(findfile.postedfile.filename);
=""
="" else
="" }="" end="" of="" if-else.
=""
="" sets="" the="" upload="" button="" caption
="" (listfilelist.items.count="">1)
Upload.Text= "Upload All";
else
Upload.Text= "Upload File";
listFileList.AutoPostBack=true;
}// end of AddFile_Click()
// Code for Upload file button
private void Upload_Click(object sender, System.EventArgs e)
{
if (!IsPostBack==false)
{
HideControls(1);
//string stat1="";
string baseLocation = Server.MapPath("~/Files/Upload/");
string status = "";
if((listFileList.Items.Count == 0) && (filesUploaded == 0))
{
lblStatus.Text = "Error - a file name must be specified.";
return;
}// end of if
// call to CheckUploadFile() to check availability of the details of specified file
CheckUploadFile();
// if details of all files available then only it uploads these files
if (stat == "")
{
HtmlInputFile HIF = new HtmlInputFile();
foreach(System.Web.UI.HtmlControls.HtmlInputFile HIF1 in hif)
{
string fn = ln + "-" + System.IO.Path.GetFileName(HIF1.PostedFile.FileName);
if (File.Exists(baseLocation+fn)==false)
{
HIF1.PostedFile.SaveAs(baseLocation + fn);
UpdateCheck(fn, j);
filesUploaded++;
status += fn + " ";
}
else
{
filesExists++;
stat1 += fn + " ";
}
j++;
}// end of foreach
}
// else it will shows the error message
else
{
lblStatus.Text = "The details for following file(s) were not available. Please enter the details & try again.: " + stat;
stat = "";
return;
}//end of if-else
// after uploading all the files it shows the summary
if(filesUploaded == hif.Count)
{
lblStatus.Text = filesUploaded + " file(s) were uploaded: " + status;
}//end of if
else
{
lblStatus.Text = filesUploaded + " file(s) were uploaded: " + status + " " + filesExists + " File already exist(s)..... " + stat1;
stat1="";
}
hif.Clear();
listFileList.Items.Clear();
}
}// end of Upload_Click()
Any body tell me what is the problem...?
Pravin
|
|
|
|
|
PRB: Cannot Upload Large Files When You Use the HtmlInputFile Server Control
:
RESOLUTION
To resolve this problem, use one of the following methods:
• In the Machine.config file, change the maxRequestLength attribute of the <httpruntime> configuration section to a larger value. This change affects the whole computer.
• In the Web.config file, override the value of maxRequestLength for the application. For example, the following entry in Web.config allows files that are less than or equal to 8 megabytes (MB) to be uploaded:
<httpruntime maxrequestlength="8192">
|
|
|
|
|
hi,
in my project i want to create a text editor. i have searched in google. but i didn't get any relevant information. please provide me some reference to find out sample codes for that. please help me..
|
|
|
|
|
|
|
Those are my favorites..
TinyMCE (Tiny Moxiecode Content Editor)
TinyMCE, also known as the Tiny Moxiecode Content Editor, is a platform-independent web-based JavaScript/HTML WYSIWYG editor control, released as open source software under the LGPL by Moxiecode Systems AB. It has the ability to convert HTML textarea fields or other HTML elements to editor instances. TinyMCE is designed to easily integrate with content management systems.
TinyMCE integrates with many different open source systems, such as Mambo, Joomla!, Drupal and WordPress.
(Ref: http://en.wikipedia.org/wiki/TinyMCE)
FCK Editor
This HTML text editor brings to the web much of the power of desktop editors like MS Word. It's lightweight and doesn't require any kind of installation on the client computer.
|
|
|
|
|
|
Hi,
How to read and write pagemaker files with the pagemaker extention (like HTML editer) in ASP.NET/C# Application?
Regards,
Gopalan Mani
|
|
|
|
|
Hi,
Did you find any solution for this? Please let me know if any solution is there for this.
Thanks,
Kiran
|
|
|
|
|
Hello Gopalan Mani, did you get progress on this question?
|
|
|
|
|
hello,
I got the following error while creating a new web application.
visual studio .net has detected that the web server is not running asp.net version1.1. You will be unable to run asp.net web applications or services
Can somebody help me.
Regards
|
|
|
|
|
GaneshKumarVkm wrote: visual studio .net has detected that the web server is not running asp.net version1.1. You will be unable to run asp.net web applications or services
1) IIS is not running. So, you go to IIS manager and start the service
OR
2) You install the ISS after installing VS. then, type aspnet_regiis -i in VS commandline
OR
3) The version of ASP.NET is not 1.1 in your IIS. then, go to IIS manager and change the version from 2 to 1.
Hope it helps.
|
|
|
|
|
hello,
Thanks for ur reply. I cleared now. Can u tell is it possible to create menus in asp.net using vs 2003
I am new to vs2003
Regards
|
|
|
|
|
There is no standard menu in VS 2003. but there are a lot of ASP.NET 1.1 menu and Javascript menu so you can google it..
|
|
|
|
|
I have created a usercontrol which has some images,Login button and logout button.This control i am using in all the pages.In one of the page there are some textboxes,OK button below it and the same usercontrol at top of the page.
when i press enter in textbox control,focus goes to Login button of a usercontrol and calls its event automatically without pressing it.This happens in every page where textbox is there.When i press enter key i want the focus to go in OK button instead to usercontrols login button.Thank you.
coolsatty
|
|
|
|
|
|
|
There is no need to post the same post multiple time. If accidentally it has been posted then you can delete them.
Apurva Kaushal
|
|
|
|
|
I want to connect to a database and retrieve and insert data which is in another server.which means the database is not in our server.
it may be in another server globally remote.
this is about an asp web application.
please reply me as soon as possible
dayya
gayan
|
|
|
|
|
iam doing an application in a way that iam adding text box to the panel one after the another upto 10 text boxes iam able to see the text box which genarated last but when scroll bar of the panel comes iam uanable to see the last added text box...how i can view the last added text box plz wen a scrollbar in the panel comes or i can scroll the panel with out mouse so that i can view the last added text box
|
|
|
|
|
What about setting the scrollbar by using Javascript??
|
|
|
|
|
actual my requirement is that iam having a form with 100 fileds to fill ..i kept the form in the panel so the scroll ber is comming ..now iam having a textbox outside the panel where the user enter the filed value and the field value comes in the panel form to the respective field..its working fine upto some values.the fields after the scroll ber is not visble to person what it was filled again panel have to scroll..is there is any method to scroll vartical scroll bar panel automatically down each time wen user enter the values
|
|
|
|
|
Hi,
have u set the height and width of the panel
|
|
|
|