|
I have a xml file in which there is tag of IMAGE_DATA that contain the image data in decimal formate. I am tring to read the IMAGE_DATA and write it in a new file to create an image. But when i write the data in .jpg file, it does not create am image.
please help me.
Regards,
Irfan Ali
Irfan Ali
|
|
|
|
|
Then either it's not an image in JPEG format, or you are doing something wrong when you create it.
What is your code for writing the file, and what is the first few bytes of the data?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Here is the code. Please take a look.
byte intnum;
string hexnum;
string s;
s = "0xFFD8FFE000104A46494600010101013101310000FFDB004300050304040403050"
FileStream fs = new FileStream(@"F:\\users\irfan.ali\\Practice\\HotelImage.jpg", FileMode.Create);
for (int i = 1; i <= s.Length; i++)
{
hexnum = s.Substring(i,2);
intnum = Convert.ToByte("&H" + hexnum);
fs.WriteByte(intnum);
}
Irfan Ali
|
|
|
|
|
No wonder that doesn't work...
You have to skip the first two characters, as that is the hexadecimal prefix. If it's not present, you should start from zero, not from one.
You are decoding two characters at a time, but you are only advancing the counter by one. That means that you first decode "FF", then "FD", then "D8", then "8F", and so on.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi every one
i want to create the shopping cart with xml can anyone have any idea about how to create it
|
|
|
|
|
a shopping cart with Xml? nothing else? Are you in marketing by any chance?
|
|
|
|
|
I am using SmtpMail for sending email. I gave my emailid as "to" and "from" address. Eventhough it is showing a success message, when I open my Inbox, it is not there. Why?
Thanks in advance.
|
|
|
|
|
did u check in SPAM Folder ?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Have you configures your SMTP correctly ?. If yes check your SMTP logs to see if the mail has been actually sent.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
|
In your IIS. Go to SMTP > Right Click > [Tab] General > Check Enable logging is Enabled > Properties
In that one log file directory
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
|
You are trying to send the mail from ASP.NET itself right ?.Sorry i have no idea how to check the SMTP in Apache.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hello
Do you know any way to generate asp.net page on the fly? On the fly means when user goes to page like this www.test.com/Survey it will load data from database for Survey...
I've been using redirection on the 404 error in my webconfig and then I parse aspxerrorpath to see what user want to access. But this thing works on my IIS from VS and not on the webhosts I used (bizhost.com, quantasoft.eu)
Do you know any other way how to handle that? Ah and I dont want to use query string (www.test.com/generator.aspx?id=Survey)
Below is part of my web.config:
<code> <customerrors mode="On" defaultredirect="GenericErrorPage.htm">
<error statuscode="404" redirect="Survey.aspx" />
</customerrors></code>
<div class="ForumMod">modified on Monday, March 31, 2008 3:57 AM</div>
|
|
|
|
|
|
|
Hello!
With CR 2008 came a number of new exportformats, such as .txt. My problem is these new formats aren´t showing in the CrystalreportsViewer when one click "Export this report".
Does anyone else have this problem or know of a solution?
|
|
|
|
|
Hi all,
How to bind datatable to report viewer dynamically based on users search criteria using c#.......
Ash
|
|
|
|
|
ReportDocument1.Database.Tables[0].SetDataSource(YourDataTableHere);
CrystalReportViewer1.ReportSource = ReportDocument1;
modified on Monday, March 31, 2008 4:09 AM
|
|
|
|
|
Hello Friends...
In my application i have to generate reports using PUSH Model.I have used the following code in my app.
public void BindReport()
{
SqlConnection myConnection = new SqlConnection();
myConnection.ConnectionString = "server=.;database=Test;uid=sa;pwd=test; ";
SqlCommand MyCommand = new SqlCommand();
MyCommand.Connection = myConnection;
MyCommand.CommandText = "Select * from EmployeeMaster";
MyCommand.CommandType = CommandType.Text;
SqlDataAdapter MyDA = new SqlDataAdapter();
MyDA.SelectCommand = MyCommand;
DataSet2 myDS = new DataSet2();
//This is our DataSet created at Design Time
MyDA.Fill(myDS, "EmployeeMaster");
// CrystalReport1 oRpt = new CrystalReport1();
// This is the Crystal Report file created at Design Time
//oRpt.SetDataSource(myDS);
// Set the SetDataSource property of the Report to the Dataset
CrystalReportViewer1.ReportSource = oRpt;
// Set the Crystal Report Viewer's property to the oRpt Report object that we created
}
But the problem is that i am not able to access the report that i have created at the design time.
Thats the main problem that i am having plase help me out.......
Deepak Nigam
|
|
|
|
|
Dear all,
Here i have a problem with text changed event.
I have a popup calender which i will select in a textbox.
I want to check the selected date with the date, which is already entered before this record.
I want to check after selecting one date from calender, that the selected date is greater than the inserted date.
Here on textchanged event,that means user should enter data into the textbox,then only the event is firing.but it is not happening at the time of date selectd from popup calender.
My requirement is the event has to be fired on both cases,ie if the user enters date from keyboard or selects from pop-up calender.
i have tried using querystring,on databinding etc.It is not working.can anybody give me some idea.
Thanks in advance
kissy
|
|
|
|
|
CalendarExtender has event "OnClientDateSelectionChanged"
try using this event.
|
|
|
|
|
I didnt get ur idea.Tell me how to use this event.
kissy
|
|
|
|
|
in my asp.net application,i have a manu javascript in a user control.when ever onclick ,it s directed to other aspx forms.for this i am using the script:
var menu1=new Array()//for payroll
menu1[0]='Payroll management'
menu1[1]='Payroll Compensation'
i want to open the aspx page in a seperate new window. how can i do this?
also i am using a seperate msi also in this project.For that also i am giving the same script:
var menu8=new Array()//for Mail
menu8[0]='a href="httprequest/Start.aspx">e-mail'
Its working fine,but i have to click back button in the browser to go my application again.so i want to open this msi also in a seperate new window.what is the script for that..?
modified on Monday, March 31, 2008 1:40 AM
|
|
|
|
|
I have a grid for binding the data according to the rowindex.I get the selected grid rowindex.I want to check the rowindex is exists in the grid.How is it possible.Please help me to sort out the problem.
|
|
|
|