|
here file.name contains that arabic file name with a long name characters.
Response.AddHeader("content-disposition", "attachment; filename=" & Server.UrlPathEncode(file.Name))
Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = type ' "application/octet-stream"
Response.WriteFile(file.FullName)
Response.End()
|
|
|
|
|
|
hi Abhijit
sorry to disturb u ...i have got the soluting for that problem.now this is new problem iam facing abi..since some cases the arabic file name is large more than 40 characters in length then while saving the file actual file name is not coming
|
|
|
|
|
REspected all,
I am using Ajax control : MaskedEditExtender & MaskedEditValidator for date
I want date format in "dd/MM/yyyy"
Please tell me, how can I sset this
|
|
|
|
|
Set UserDateFormat="DayMonthYear" CultureName="en-GB"
Hope this will help you.
|
|
|
|
|
As per you told,I set that properties.
But nothing happend
Following is my design-code,
Please let me know that all properties I set is correct or do any changes
<act:maskededitextender id="MaskedEditExtender2" runat="server"
="" targetcontrolid="txtFrmDate" mask="99/99/9999" messagevalidatortip="true" onfocuscssclass="MaskedEditFocus" oninvalidcssclass="MaskedEditError" masktype="Date" displaymoney="Left" acceptnegative="Left" errortooltipenabled="True" userdateformat="DayMonthYear" culturename="en-GB">
<act:maskededitvalidator id="MaskedEditValidator2" runat="server"
="" controlextender="MaskedEditExtender2" controltovalidate="txtFrmDate" emptyvaluemessage="Date is required" invalidvaluemessage="Date is invalid" display="Dynamic" tooltipmessage="Input a date" emptyvalueblurredtext="*" invalidvalueblurredmessage="*" validationgroup="MKE">
|
|
|
|
|
Hi,
How to play a sound file in cliect system when an event occur. The music file will be in client system eg: "d:/music.mp3"
Thankyou
YPKI
|
|
|
|
|
This is no way related to ASP.Net.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
I hate you !!! (Previous dude)
There is a LiveSound tool that you can use ... but it's EXPENSIVE !!!!
Otherwise you'll have to use AJAX (Let my cry with you !) :,-(
|
|
|
|
|
Which Kind of this Error
Value of type 'System.Globalization.CultureInfo' cannot be converted to 'String'.
|
|
|
|
|
KhandelwalA wrote: Value of type 'System.Globalization.CultureInfo' cannot be converted to 'String'.
KhandelwalA wrote: Which Kind of this Error
This is Type casting Error.
|
|
|
|
|
KhandelwalA wrote: Which Kind of this Error
What made you think that it can be converted to string?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
|
|
|
|
|
anushh wrote: Using themed css files requires a header control on the page. (e.g.
What does it mean ? What is your question ? Can you please little bit of clear?
|
|
|
|
|
He simply posted the error message(that too with a smily )
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Did you even try once to find the reason.
A simple google search would have helped you and saved a lot of your time. Plus, learning things yourself will help you improve.
In between, have a look at this[^].
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi friend
My web services give the error of 404 how i resolved to this problem please help me.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
Eventure Technology
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Piyush Vardhan Singh wrote: My web services give the error of 404
When you are getting this error? Did you searched in google for Error Code 404?
|
|
|
|
|
404 usually indicates that the client was able to communicate with the server but the server could not find what was requested.
You need to check the uri for the webservice.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi....
I am using HttpFileCollection for uploading multiple files.
It works fine,but problem arises when i am using same HttpFileCollection in another SendExternalMail().
I am not getting byte values.its bytes values are zero.
Here is the code.
public void SendInternalMail()
{
HttpFileCollection hfc = Request.Files;
if (hfc.Count != 0)
{
for (int i = 0; i < hfc.Count; i++)
{
if (!string.IsNullOrEmpty(hfc[i].FileName))
{
Int32 File1Length = hfc[i].ContentLength;
Stream File1Stream;
File1Stream = hfc[i].InputStream;
//Here i am getting proper byte values
byte[] btFileContent = new byte[File1Length];
File1Stream.Read(btFileContent, 0, File1Length);
IsZip = 1;
string strflname = hfc[i].FileName;
strExtension = System.IO.Path.GetExtension(strflname);
strflname = System.IO.Path.GetFileName(strflname);
strImageType = hfc[i].ContentType;
if (strImageType == "image/pjpeg" || strImageType == "image/bmp" || strImageType == "image/gif" || strImageType == "image/x-png" || strImageType == "image/tiff")
{
objZipUnZip.UploadImage(strflname, btFileContent, strImageType, File1Length, Convert.ToInt32(Session["UserCode"]), out objCode);
strVal = strVal + objCode + ",";
}
else
{
if (objZipUnZip.ZipFiles(btFileContent, strflname, strExtension, IsZip, Convert.ToInt32(Session["UserCode"]), out iFilecode))
{
strVal = strVal + iFilecode + ",";
}
}
}
}
}
public void SendExternalMail()
{
string strAttach = string.Empty;
string strSendAttach = string.Empty;
string strFileName = string.Empty;
string strFileAttachment = string.Empty;
bool bFlag = false;
for (int i = 0; i < hfc.Count; i++)
{
if (!string.IsNullOrEmpty(hfc[i].FileName))
{
Int32 File1Length = hfc[i].ContentLength;
Stream File1Stream;
File1Stream = hfc[i].InputStream;
//Here i can't get byte value,all values are zeros
byte[] btFileContent = new byte[File1Length];
File1Stream.Read(btFileContent, 0, File1Length);
IsZip = 0;
string strflname = hfc[i].FileName;
strExtension = System.IO.Path.GetExtension(strflname);
strflname = System.IO.Path.GetFileName(strflname);
strImageType = hfc[i].ContentType;
if (strImageType == "image/pjpeg" || strImageType == "image/bmp" || strImageType == "image/gif" || strImageType == "image/x-png" || strImageType == "image/tiff")
{
objZipUnZip.UploadImage(strflname, btFileContent, strImageType, File1Length, Convert.ToInt32(Session["UserCode"]), out objCode);
strVal = strVal + objCode + ",";
}
else
{
if (objZipUnZip.UploadFile(strflname, strExtension, btFileContent, IsZip, Convert.ToInt32(Session["UserCode"]), out iFilecode1))
{
strVal = strVal + iFilecode1 + ",";
}
}
}
}
}
Kindly help to solve this issue.
Thanks.
Regards,
PUJA FALDU
|
|
|
|
|
Hi All,
I have one datarow which contains some rows. Now i am copying values from datarow to arraylist using forloop.
But this is again taking some time.
Now i want copy values form datarow to arraylist or array without using forloop.
Is there any way to implement this using LINQ or any other concept.
The code which i used is mentioned below.
DataTable myTable = null;
DataRow[] foundRows = null;
ArrayList RequiredList = new ArrayList();
Array[] arrayForData = null;
ArrayList arrayListFordata = new ArrayList();
DataSet dsForData = null;
if (Session[strSessionDataList] == null)
{
CatalogController _controller = new CatalogController();
Session[strSessionDataList] = arrayListFordata;
}
else
{
dsForData = new DataSet();
dsForData = Session[strSessionDataList] as DataSet;
myTable = dsForData.Tables[0];
if (myTable.Rows.Count > 0)
{
foundRows = myTable.Select("val like '" + item + "%'");
arrayForData = new Array[foundRows.Length];
foundRows.CopyTo(arrayForData, 0); This is not working, it is giving runtime error like type mismatch
//for (int count = 0; count < foundRows.Length; count++)
//{
// RequiredList.Add(foundRows[count].ItemArray[0].ToString());
//}
//for (int count = 0; count < myTable.Select("val like '" + item + "%'").Length; count++)
//{
// RequiredList.Insert(count, myTable.Select("val like '" + item + "%'")[count].ItemArray[0]);
// //foundRows.ItemArray[count] = myTable.Select("val like '" + item + "%'")[count].ItemArray[0];
//}
}
}
if (RequiredList.Count == 0) RequiredList.Add("Fail");
//return RequiredList;
modified on Wednesday, July 1, 2009 4:31 AM
|
|
|
|
|
Try using Property
objRow.ItemArray
|
|
|
|
|
Hi,
I want to maintain state of radiobuttons while paging in gridview control.Is there any solution plz reply me asap.
Thanks
Farogh Haider
Web developer
|
|
|
|
|