Click here to Skip to main content
15,890,947 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionUsing themed css files requires a header control on the page. (e.g. <head runat="server" />). Pin
anushh30-Jun-09 21:32
anushh30-Jun-09 21:32 
AnswerRe: Using themed css files requires a header control on the page. (e.g. ). Pin
Abhijit Jana30-Jun-09 21:40
professionalAbhijit Jana30-Jun-09 21:40 
GeneralRe: Using themed css files requires a header control on the page. (e.g. ). Pin
Manas Bhardwaj30-Jun-09 21:41
professionalManas Bhardwaj30-Jun-09 21:41 
AnswerRe: Using themed css files requires a header control on the page. (e.g. ). Pin
Manas Bhardwaj30-Jun-09 21:40
professionalManas Bhardwaj30-Jun-09 21:40 
Question404 Error in webservices? Pin
Piyush Vardhan Singh30-Jun-09 21:20
Piyush Vardhan Singh30-Jun-09 21:20 
AnswerRe: 404 Error in webservices? Pin
Abhijit Jana30-Jun-09 21:31
professionalAbhijit Jana30-Jun-09 21:31 
AnswerRe: 404 Error in webservices? Pin
Manas Bhardwaj30-Jun-09 21:43
professionalManas Bhardwaj30-Jun-09 21:43 
QuestionCan't get HttpFileCollection's Byte balues when using it second time. Pin
pujafaldu30-Jun-09 21:08
pujafaldu30-Jun-09 21:08 
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
Questioncopying datarow to arraylist/array without using forloop........ [modified] Pin
dayakar_dn30-Jun-09 21:01
dayakar_dn30-Jun-09 21:01 
AnswerRe: copying datarow to arraylist/array without using forloop........ Pin
Aman Bhullar1-Jul-09 20:23
Aman Bhullar1-Jul-09 20:23 
QuestionMaintain state of radiobuttons while paging in gridview control Pin
farogh haider30-Jun-09 20:43
farogh haider30-Jun-09 20:43 
AnswerRe: Maintain state of radiobuttons while paging in gridview control Pin
Abhijit Jana30-Jun-09 20:51
professionalAbhijit Jana30-Jun-09 20:51 
GeneralRe: Maintain state of radiobuttons while paging in gridview control Pin
farogh haider30-Jun-09 21:26
farogh haider30-Jun-09 21:26 
AnswerRe: Maintain state of radiobuttons while paging in gridview control Pin
Niladri_Biswas30-Jun-09 20:52
Niladri_Biswas30-Jun-09 20:52 
QuestionTreeView control - dynamically bound to an XmlDocument? NavigationUrl Pin
devvvy30-Jun-09 20:12
devvvy30-Jun-09 20:12 
QuestionProblem getting client side value in server side Pin
CrazyCoder2630-Jun-09 19:06
CrazyCoder2630-Jun-09 19:06 
AnswerRe: Problem getting client side value in server side Pin
Aman Bhullar30-Jun-09 19:14
Aman Bhullar30-Jun-09 19:14 
GeneralRe: Problem getting client side value in server side Pin
CrazyCoder2630-Jun-09 19:17
CrazyCoder2630-Jun-09 19:17 
QuestionHow to do HTTP GET request Pin
fuhaizah30-Jun-09 18:06
fuhaizah30-Jun-09 18:06 
AnswerRe: How to do HTTP GET request Pin
Christian Graus30-Jun-09 18:24
protectorChristian Graus30-Jun-09 18:24 
GeneralRe: How to do HTTP GET request Pin
fuhaizah30-Jun-09 18:29
fuhaizah30-Jun-09 18:29 
GeneralRe: How to do HTTP GET request Pin
Christian Graus30-Jun-09 18:31
protectorChristian Graus30-Jun-09 18:31 
GeneralRe: How to do HTTP GET request Pin
fuhaizah30-Jun-09 18:36
fuhaizah30-Jun-09 18:36 
GeneralRe: How to do HTTP GET request Pin
Christian Graus30-Jun-09 21:35
protectorChristian Graus30-Jun-09 21:35 
AnswerRe: How to do HTTP GET request Pin
Aman Bhullar30-Jun-09 19:16
Aman Bhullar30-Jun-09 19:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.