|
I finally got a chance to try this at home, and here's the C# version of the PHP code posted in the original message:
private string HexToBin(string data)
{
string newData = "";
if (data != "")
{
for (int i = 0; i < data.Length; i += 2)
{
string hexValue = data.Substring(i, 2);
newData += Convert.ToChar(Byte.Parse(hexValue, NumberStyles.HexNumber));
}
}
return newData;
}
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
That function doesn't do the same as the PHP function.
As I already explained, you need to use an Encoding class do decode the data if you want the result as a string. Now you are just taking the data and using it as unicode character codes. That only works for the characters that happen to have the same character code in unicode as they have in the encoding that was used to create the data.
---
single minded; short sighted; long gone;
|
|
|
|
|
Can anybody tell me that AOL support the calendar data api to access canlendar data of AOl in to third party website?
If yes then tell me which AOL API support that and how can i use that API.
Thank you.
Waiting for reply
Vishal Mithawala.
|
|
|
|
|
Hi..
I want to know the integration procedure of CCAvenue Payment gateway to integrate it with a ASP.NET 2.0 Shopping Cart Web Site. I am not able to see the procedure on CCAvenue's official website without beeing registered.
Can anyone provide me the solution to complete the task. I will be very thankful.
Abhishek Dubey
abhi
|
|
|
|
|
Hi,
I have problem in Fileupload, it will postback. Is there a way to prevent from posting back?
Thank you
hifiger2004
|
|
|
|
|
No. The file data is sent in the request to the server. No postback, no upload.
---
single minded; short sighted; long gone;
|
|
|
|
|
How can we control the process to execute it just only once?
Because, I have one button wherein the process will upload the excel file and at the same time will add the number of quantities into the database.
If this will be the case how can I control the process, because it will affect also on the adding of quantities, it will result to times 2 which is not correct.
hifiger2004
|
|
|
|
|
One thing you can do is, on your postback, once your code has processed the postback, in your prerender, redirect to the same URL, and put something on the query string to make the page reload it's data. This way, a refresh will not perform the postback again.
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 )
|
|
|
|
|
YES!
It is working fine now. I just transfered my source code into the prerender then the result perfect, exactly as what I need.
Thank you Christ
hifiger2004
|
|
|
|
|
*grin* glad to help.
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 )
|
|
|
|
|
hifiger2004 wrote: Thank you Christ
I have to be satisfied with the odd '5' vote, whilst you get elevated from a plain old CodePorject staff member to the son of God in a single thread.
You can only go one higher...
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
"This time yesterday, I still had 24 hours to meet the deadline I've just missed today."
|
|
|
|
|
URGENT HELP NEEDED
ERROR1: (if provider is msdaora)
Provider (0x80040E55)
Column does not exist.
ERROR 2: (if provider is OraOLEDB.oracle)
OraOLEDB (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Hi,
i am getting above mentioned errors when i am trying to access an stored procedure in oracle 9i from an asp page. The stored procedure accepts two input variables and returns a ref cursor with result. SP is working fine if i test it at the backend.
CODE:
STORED PROCEDURE:
----------------------------------------------------------------------------------------
PROCEDURE GET_FIN_APPROVERS(p_user_id IN VARCHAR2,
p_ccc IN VARCHAR2,
o_cursor1 OUT NOCOPY REF_CURSOR)
AS
v_ccc VARCHAR2(100);
v_grade VARCHAR2(10);
BEGIN
select hou.attribute1 into v_ccc from apps.hr_all_organization_unitS hou,
apps.pay_cost_allocation_keyflex pcaf
where pcaf.COST_ALLOCATION_KEYFLEX_ID = hou.COST_ALLOCATION_KEYFLEX_ID
and pcaf.segment2 = p_ccc;
select grade into v_grade from hrr_t_emp_master
where staffnr = p_user_id and term_date is null;
xx_egpo_sro_req_pkg.get_approvers(p_user_id => p_user_id,
p_ccc => v_ccc,
p_grade => substr(v_grade,4),
o_cursor => o_cursor1 );
END GET_FIN_APPROVERS;
----------------------------------------------------------------------------------------
ASP CODE:
----------------------------------------------------------------------------------------
<%
db_CFRS = "Provider=msdaora; Data Source=erpudev; User ID=apps; Password=devapps"
SET Con = Server.CreateObject("ADODB.Connection")
Con.Open db_CFRS
Set cmdCfrsEmail= Server.CreateObject("ADODB.Command")
With cmdCfrsEmail
Set .ActiveConnection = Con
.CommandType = adCmdText
Set paramUser_Id = .CreateParameter("p_user_id", adVarChar, adParamInput, 100, "p_ccc")
.Parameters.Append paramUser_Id
Set paramCCC = .CreateParameter("p_ccc", adVarChar, adParamInput, 10, "5381")
.Parameters.Append paramCCC
SET paramOutput = .CreateParameter("o_cursor1",adVarChar,adParamOutput,5000)
.Parameters.Append paramOutput
' Resultset will fetch up to 100 actions currently. Increase if necessary
.CommandText = "{call xx_egpo_sro_req_pkg.get_fin_approvers(?,?,{resultset 100, o_cursor1})}"
'Response.Write .CommandText
Set rsCFRS =.Execute()
End With
%>
----------------------------------------------------------------------------------------
PLEASE HELP URGENTLY AS I AM NEARING DEADLINE AND THIS IS THE CHANGE REQUESTED URGENTLY.
APPRECIATE YOUR HELP IN ADVANCE
THANKS,
AZEEM QAISER
|
|
|
|
|
I sat down and started the application when I went to open a file in the projects folder... It says its gone renamed It tells me to expand the project node for more info... HELP weird stuff going on.
|
|
|
|
|
Are you new to web development?
If so, I'd suggest buying (or finding a friend that has -- i cannot suggest pirating in good conscience, but it's there) a good book on it.
Specifically, Beginning ASP.NET 2005 in C#. (or VB.NET if you prefer) Published by Apress. Between $30-40US.
http://www.amazon.com/Beginning-ASP-NET-2-0-2005-Professional/dp/1590595726/ref=sr_1_4/105-1894697-3759602?ie=UTF8&s=books&qid=1190778126&sr=8-4
In fact, I still have my series of Apress books I keep for references. They come in handy.
|
|
|
|
|
Hi everyone!
I have a html page with an IFrame; and the following code:
var doc = document.getElementById("iframe_id").contentDocument;
doc.body.innerHTML = htmlCode;
This code is run in body's onload handler. 'htmlCode' contains some (very simple) html (it is a string, of course).
I was able to test this code only in Safari 1.3 (Mac), and it didn't work
BUT: I need to test it in a Safari 2.0.4. Unfortunatelly, I don't have access to it. Anyone (with Mac) can tell me if it will work?
And why the above code didn't work with Safari 1.3? Is it possible to fix it?
Thank you very much in advance!
P.S. I understand it is a MS-centric forum, but... I do hope.
-------------------------
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
You might have better luck with writing the entire page into the iframe. Example:
var doc = document.getElementById("iframe_id").contentDocument;
doc.open();
doc.write('<html><head><title></title></head><body>'+htmlCode+'</body></html>');
doc.close();
---
single minded; short sighted; long gone;
|
|
|
|
|
Ok, this variant does work But what to do with the original code? Does it work in the Safari 2?...
Thanks anyway.
-------------------------
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
Dmitry Khudorozhkov wrote: But what to do with the original code? Does it work in the Safari 2?...
I don't know. I don't have a mac.
---
single minded; short sighted; long gone;
|
|
|
|
|
Dmitry Khudorozhkov wrote: But what to do with the original code? Does it work in the Safari 2?...
That code does work on Safari for Windows, although it's a little bit different in size and exact location.
Eriawan
|
|
|
|
|
I wrote a Windows Forms application in Visual Basic 2005.
What would be involved in converting it to run as an internet web application?
|
|
|
|
|
A full rewrite.
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 )
|
|
|
|
|
This Visual Basic 2005 app is basically a wizard that starts out with a background image. Then the user selects a number of images to overlay it producing a final image that is saved for later retrieval, and can be printed or emailed.
The 'other' images are .png files with transparent backgrounds.
Can the vb.net code be installed on the web server and executed from a browser as an internet app or does it have to be rewritten and, if so, in what language?
|
|
|
|
|
It depends how you've written the code, but it may well need totally re-written, at least the front end will.
You'll be going from a nice state-ful environment to a totally stateless one. Sounds like you might also need some fun javascript for interacting with your overlays.
|
|
|
|
|
|
hai
i am an asp programmer.
i have two combo boxes optone and opttwo.
i have loaded values for optone from database
selected
<%
sqlPRO = "Select field1 From tablename"
set rs= conn.Execute(sqlPRO)
i=1
do while Not rs.EOF
%>
<%=rs("field1")%>
<%
i=i+1
rs.MoveNext
loop
rs.Close
%>
now i want to load a value for the second combobox opttwo
it's dependant on the first combobox optone
function setOptions(chosen)
{
var selbox = document.frm.opttwo;
selbox.options.length = 0;
selbox.options[selbox.options.length] = new Option('Select','oneone');
<%
strSQLQry = "Select field1 From tablename where ID='" & chosen & "'"
rs.Open strSQLQry, conn
rs.MoveFirst
While Not rs.EOF
%>
valFromList = "<%=rs("field1")%>";
selbox.options[selbox.options.length] = new Option(valFromList,'oneone');
<%
rs.MoveNext
Wend
rs.Close
%>
}
this code shows an error.i can't get the javascript variable into asp.
if anyone known please help me
Ganesh Mohan
|
|
|
|