|
Whether you are uploading a 1 GB file through
1. Mail attachement or
2. File upload control
Both case to send a request of 1 GB to server, you have to tell the server that you are going to send a request having size more that 4096 KB( Becuase by default MAX request size length that you can send to IIS is system defined and it is 4096 KB)
Configure you application to tell IIS the same as following
Add this in web.Config file
<httpRuntime maxRequestLength="size in KB" executionTimeout="seconds">
Put the amount of data you want to Transfer in KB and adjust the time in seconds.
I hope it solves your problem ...
Arindam D. Tewary
|
|
|
|
|
if you want to get a file upload control i can tell you some method.
but sorry for my poor english ,if you know some chinese,contract me ,i will tell you .
I think therefore I am
--~--~---------~--~----~------------~-------~--~----~
My Blog and Website:
http://www.cnblogs.com/pinzui/
http://www.pinzui.cn
http://jnlinux.org
--~--~---------~--~----~------------~-------~--~----~
|
|
|
|
|
suppose i have a html table with 5 records means 5 rows.i want that when my server side code will return a html table with 2 rows to client
side javascript then how could i dynamically remove all rows from my existing html table and add new 2 rows.so basically i have to know
how could i parse server side code by javascript and add 1 row in my table one after one and i want to have crossbrowser javascript for this case.
pls guide me with sample code
tbhattacharjee
|
|
|
|
|
==========================================================================
For Cross browser compatibility you can use this javasctipt code to detect which browser in is use. And then subsequently do the required.
==========================================================================
function whichBrs() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}
==========================================================================
For creating number of rows in HTML table you can do like this ...
==========================================================================
Assume that you are getting a DataTable dTSourceTable from the server side
code
Now in HTML/aspx you have to insert server side code
<br />
<br />
<table width="100%" border="1"><br />
<% for(int p=0;p<dTSourceTable.Rows.Count;p++){%><br />
<tr><br />
<td width="100%">Display something here ...</td><br />
</tr><br />
<%} %><br />
</table><br />
<br />
Dont forget to declare "dTSourceTable" as a class level public variable in code behind file. Otherwise it will give error.
Hope it helps you ...
Arinda D Tewary
|
|
|
|
|
Assume that you are getting a DataTable "dTSourceTable" from the server side
code
Now in HTML/aspx you have to insert server side code
<table width="100%" border="1" >
<% for(int p=0;p<dTSourceTable.Rows.Count;p++){%>
<tr>
<td width="100%">Row</td>
</tr>
<%} %>
</table>
"dTSourceTable" must be declared public and class level variable in code behind file.
Arindam D. Tewary
|
|
|
|
|
sometime we render a image in a page just like writting the code like bitmap.Save (Response.OutputStream, ImageFormat.Gif);
but if i do it in this way then we can position the image according to my position.so pls tell me how could i directly attach any
output stream content to placeholder control or image control in asp.net.pls guide me with sample code
tbhattacharjee
|
|
|
|
|
i wrote a code which basically read a TIFF file and on fly it converts TIFF file to GIF and then render the GIF file to aspx page.
my code is working fine but it does not open in its original size.when image is render in aspx page then a symbol is coming
and when i click on that in IE browser then my image shows in its original size.so i want to know how could i write a code
as a result from the begining the image render in its original size.pls guide me with sample code
here i am giving my small code which basically read a TIFF file and on fly it converts TIFF file to GIF and then render the GIF file to aspx page.
string FName=Request.PhysicalApplicationPath +"Images\\Tridip.TIF";
bool fFound=false;
byte[] b1=null;
if(File.Exists(FName))
{
MemoryStream stream = new MemoryStream ();
fFound=true;
System.IO.FileStream fs1=null;
fs1=System.IO.File.Open(FName,FileMode.Open,FileAccess.Read);
b1=new byte[fs1.Length];
fs1.Read(b1,0,(int)fs1.Length);
Bitmap bitmap = new Bitmap (fs1);
Response.ContentType = "image/gif";
bitmap.Save (Response.OutputStream, ImageFormat.Gif);
fs1.Close();
}
else
{
fFound=false;
}
tbhattacharjee
|
|
|
|
|
what is the difference btn callback() and Ispostback() in C#.net
devi
|
|
|
|
|
Just the way internally .NET framework handles it ...
You have to know the way these two happens ..
PostBack Callback
============================ =====================================
A Post request to server Fired by a client side event handler
( Can be made only by a server ( Can be made by a client side
side element.) element)
| |
Page init Page-Init
| |
Load the page state Load the page_state
| |
Prcess the postback data Process Postback data
| |
Page Load Page Load
| |
Any Postback event CallBack events( As defined
(Like SelectedIndexChnaged, in ICallBackEventhanler
PageIndexChanged methods executed ) Like RaiseCallBackEvent() method )
| |
Save the page state |
| |
Page PreRender |
| |
Page Render |
| |
Page Unload Page Unload
| |
Response Back to the Client Response Back to the Client
As you can see ...
1. Callback can be initited from a client side element.
But Postback can be initiated by a server side element.
2. Internal mechanism is totally different.
3. For callback ICallbackEventHandler must be implemented.
4. Some page state is not there. So it becomes faster that PostBack.
Hope it helps you ...
Arindam
|
|
|
|
|
|
i want to display more than one treeview on a page but not at a time.
i want all them in a array n want to increment the counter by one of the array.when i submit for first treeview it ii display second but not first with second. means as a quiz. how to call each treeview for each button click
please fast reply
|
|
|
|
|
hi to all,
I m working on control in vb.net. i have updated a site coded in vb.net(Dotnetnuke). It reflecting changes in my pc but when i uploaded it on test site , it does not reflect any changes (i think when i build the solution the .dll file does not updated). Please some one help me to upgrade the .dll or tell me how to create other using the previous one.
Any help will appreciated.
Thanx in advance,
Sachin
|
|
|
|
|
when u make changes in file complie the file do not run the applicaion on ur localhost.n then upload the only .dll file to ur site it ll definetly show the changes made in ur code.
best luck
|
|
|
|
|
hi Diya_Dev
Thanx for reply ,
Pls tell me how to compile only .Dll file. Do u mean only built the solution.
if it , sorry it does not work for me.
Sachin
|
|
|
|
|
why it has to work.
what prob at ur end.
|
|
|
|
|
hi,
I m working on dotnetnuke project.Its my first project . In this project i have done all th updation that client required. In Dotnetnuke all work is done using .ascx pages. And we have to upload only .dll file in zip format. the changes i have made only reflecting on localhost at both end(my and client) but when i upload it on server it does not reflect anything.It means the .dll file that i m uploading does not upgraded . So i just want to know how to upgrade a .dll file.
I think now u get it why i m asking that qustion.
Waiting for early reply.
Sachin
Very[D]
|
|
|
|
|
hi friends ,
i am having class which contains 5 functions in a web application. what i need is , i want to get the status of each functions while debugging (say : function1 is successfully completed, function2 is started debugging ). is it possible if i use a debugger window. can anyone know about any debugger components availabe for the same. im using visual 2005 with ajax.
thanks in advance
|
|
|
|
|
Dear friends,
Can I find time that it is taking to execute a set of statements in .Net. Here I am opening a word document in a browser using aspose library, where I open it by writing some set of statements aspose and .net
And I open it in a different browser by using window.target="_blank". Any way I want to know that, how much time that it is taking to open a new browser and the word document both. I want to calculate that time for better performance of my application. Thank you.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
trace.axd[^]
only two letters away from being an asset
|
|
|
|
|
Hi Mate,
Trace is indeed a good option.
Here is another way ...
To examine time taken executing a number of statements:Server Side:
====================================================================
<br />
StartTime = Environment.TickCount;<br />
{<br />
}<br />
EndTime = Environment.TickCount;<br />
double executionTime = (double)(EndTime - StartTime) / 1000.0;<br />
<br />
Response.Write(executionTime.ToString());<br />
if you want to see the execution time of the page .. declare StsteTime and EndTime as global variable.
To examine time taken executing a number of statements:Client Side:
====================================================================
var StartTime,EndTime,ExecutionTime;
var d = new Date();
StartTime = d.getTime();
var d2 = new Date();
EndTime = d2.getTime();
ExecutionTime = EndTime - StartTime;
alert(ExecutionTime);// in milliseconds
Arindam
|
|
|
|
|
Hi,
I have to insert 200,000 rows from datatable (from asp.net 2005 webform(vb.net 2005 code behind ) to oracle 10g table.Here if i insert this by row by row then it will not work,so i need some bulk insert from asp.net to oracle.
can anybody suggest some good way to do it.Here we need to take care that as rows are too much large so server or client should not hang.
If some code/link is available then it could be helpful to me.
thanks
montu3377
|
|
|
|
|
Hi ,
Please refer to SqlBulkCopy class in .NET 2.0.I have used this class to insert 1000 rows from ASP.NET to SQL SERVER 2005.I do not know whether it can be used with Oracle or not.So please find out if this class is helpful to you.
Thanks,
vicky
Vicky
|
|
|
|
|
I guess SQLLoader in Oracle 9i is the best option for bulk data insertion.
Arindam
|
|
|
|
|
Hi,
To insert 200,000 records into oracle it's taking around 10 mints time by using Sql loader utility method,so can you pls. suggest some good method which insert records very quickly.
I am using .csv file which containts around 200,000 records.I want to insert that records from asp.net to oracle 10g.
Can you pls. suggest better way to do it.
thanks.
montu3377
|
|
|
|
|
I have to fill a survey form with data from an oracle database.
We debate two ideas: use a dataset object or a XML file.
For XML file I would use forward only method of reading the file and not DOM, faster.
Is it more efficient generating the XML from database and then parsing the XML on the application server then using a data set returned from the database ?
Thank you
|
|
|
|