|
Hello
I have an procedure downloading data from remote server, but I am running into trouble when the files are to big. I am downloading .jpg and .tif files, and sometimes they can be up to 100 mb. Are there a way to chunk the data before sending it ?
Some of my code, written in delphi (the source of this I found in : http://www.codeproject.com/aspnet/Secure_File_Download.asp)
var
req : WebClient;
myCache: CredentialCache;
minUri: Uri;
nettverk: NetworkCredential;
data: array of byte;
begin
req := WebClient.Create;
MinUri := Uri.Create(strURL);
mycache := CredentialCache.create;
nettverk := NetworkCredential.Create(strUser,strPWD);
mycache.Add(MinUri,'Basic',nettverk);
req.Credentials := mycache;
//Creating an instance of a Response object
// := HttpContext.Current.Response;
response.Clear();
response.ClearContent();
response.ClearHeaders();
response.Charset := 'utf-8';
response.Buffer := true;
data := req.DownloadData(strURL);
response.AddHeader('Content-Disposition',
'attachment;filename=' + strfile );
response.BinaryWrite(data);
end
Thanks in advance for any answers
|
|
|
|
|
Any suggestions are realy appreciated, and it does not have to be in delphi.
mvh AnjEnd
|
|
|
|
|
i can write a subroutine that handles a datagrid's selectedindex.changed to select results from a table in a database, using the datagrid's command column as the search parameter. the problem is that i can only do this with a column that is a numbered datatype. i want to be able to do this with a column that is a string type. can someone assist me on this please. i would rather a vb.net response but iif in c# no problem.
only4pato
|
|
|
|
|
if you have this type of problem like u are trying to get a string value on GridView.SeletedIndexChanged event from a column whish has data type "String" then simply use this property
GridViewDetail.DataKeyNames = "ColumnName";
Now after the firing of GridView.SeletedIndexChanged event u got string value.
Regards
B asharatA li
Internee
METESYS Lahore
Pakistan
|
|
|
|
|
Hello all,
I have an asp.net(c#)in 2.0 project.i have followed authentication mode="Forms"
forms name="NavinsForm" loginUrl="logon.aspx" protection="All" path="/" timeout="30"/
it is working fine.
but..i want to validate only few pages in my site.
currently a.aspx and b.aspx page can see only login user.
suppose a.aspx it needs authentication (only login user can see)...but there is another page b.aspx it doesn't required any authentication(any user can see).
so what should i do.
thanks in adv.
Sujit
|
|
|
|
|
|
|
If you want to advertise your site, contact the admin for rates.
Ether way, sites like yours are the reason that only the most stupid of companies still care about certificaton. I have no qualification at all, and no employer has ever asked me about it, except the very first ( which was reasonable ).
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Ooh goody. Yet another idiot trying to get people to cheat. Have you thought through the implications of this - that you are effectively complicit in fraud because you are aiding somebody to get something for financial gain through deception. In other words, people with no knowledge getting jobs for which they have absolutely no qualification.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
how save tree view in XML.
please help
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
Piyush Vardhan Singh wrote: how save tree view in XML.
using Save Method
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
have u any link or example then give me
Piyush Vardhan Singh
Senior Software Engineer
TAS NewDelhi
India
|
|
|
|
|
Hi,
Friends help me, In my project i want to show the path of the pages like "home>addClient"
i tried it but seriously getting errors like some xml is missing..please help me..
thanks & regards
alex.
|
|
|
|
|
Malayil alex wrote: i want to show the path of the pages like "home>addClient"
i tried it but seriously getting errors like some xml is missing
SiteMapPath control uses a XML file, which should be placed on site's root. It's extension will be web.sitemap. Make sure that you have done all these
|
|
|
|
|
Hi
I have put a dropdownlist inside the datalist.On selected index changed
event i need ddlist selected value. I am find control using find control
method but when i am selected the item from dropdownlist itemcommand
event dose not get fired? Why the event dose not get fired. My code is
as follow.
Public Sub DtLreply_head_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DtLreply_head.ItemCommand<br />
Dim msginfo_selfcreate As DbProvider = New DbProvider<br />
Dim dtr3, profile_rd As SqlDataReader<br />
<br />
Dim item As DataListItem<br />
Dim ddlist As DropDownList<br />
ddlist = e.Item.FindControl("ddstatus")<br />
Dim val As String = ddlist.SelectedValue<br />
<br />
<br />
End Sub<br />
Please tell me what i should do?
Rahul
|
|
|
|
|
Do you want to get selected Datalist rows values on SelectedChanged event of dropDownList?
Where is selectedChanged Event of dropDownlist?
FInd dropdownlist control on ItemCreated event of datalist and Create EventHandler event to fire SelectedChanged Event
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi Imaran
I have to find dropdownlist control on itemcreated or on itemcommand
event of datalist. As i mentioned in code i am trying to find ddlist
on itemcommand event i need dropdownlist selected value (solved,open).
But then event dose not get fired.
my dropdownlist html is as follow.
<asp: dropdownlist="" id="ddlist" runat="server">
<asp:listitem>solved
<asp:listitem>Open .
Why the event is not get fired?
df
|
|
|
|
|
Debug that event.Is that fire or not?
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
I debug it but the event dose not get fired.
Rahul
|
|
|
|
|
May be possible that you are binding Datalist on Every postback.
Check out
<br />
if(!Ispostback)<br />
{<br />
}
bEST rEGARD
pATHAN
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi
Thanks for u r reply i solved that.
Rahul
|
|
|
|
|
Hi All,
How to disable all controls of the aspx page, when some condition occus?
I have done this thing manually. Like taking each and every control of page and setting it's propery as true.
<br />
if(status>=1)<br />
{<br />
txt_apply_for.Enabled = false;<br />
input_type_repayment.Enabled = false;<br />
input_loan_package.Enabled = false;<br />
input_first_home_buyer.Enabled = false;<br />
input_company_application.Enabled = false;<br />
input_interest_rate.Enabled = false;<br />
}<br />
else<br />
{<br />
txt_apply_for.Enabled = true;<br />
input_type_repayment.Enabled = true;<br />
input_loan_package.Enabled = true;<br />
input_first_home_buyer.Enabled = true;<br />
input_company_application.Enabled = true;<br />
input_interest_rate.Enabled = true;<br />
}<br />
But it is very tough when controls are more. Is there any other way or solution for this? Thank You
Keep Smiling...........
|
|
|
|
|
Please follow up Christian Graus and JON post
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Thnak you very much Mr. Parwej Ahamad
Keep Smiling.......
|
|
|
|
|
Read my reply, his code won't really work. You need a recursive function, and you definately do not need to do all that ugly casting.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|