Tat,
I developed web applications with IDC and HTX before using ASP. IDC is
very basic, and it would be a good idea to just rewrite those pages. That
being said, in the values clause of that SQL statement, you find
%transaction_number%. That is getting a field from the request object and
the form that submits to this .idc file will have a form field named
transaction_number. i.g. <input type="text" name="transaction_number"/>.
Of course, if you change the previous page to submit to a page like
page.aspx, then you can retrieve this value with
Request["transaction_number"]. You can retrieve these values in Page_Load
or at any other time and make an ADO.NET call to perform this insert SQL
statement. Of course, in your connection, just set your username and
password for the database. Each .idc file also has a template file, .htx
that takes values from the .idc file.
IDC and HTX was really hot as a very early way to develop functional web
apps with IIS on WinNT. A quick google search will unearth several of them:
http://www.google.com/search?sourcei...TF-8&q=idc+htx
Let me know if this helps you.
--
Best regards,
Jeffrey Palermo
Blog:
http://dotnetjunkies.com/weblog/jpalermo
"Tat" <th**************************@hotmail.com> wrote in message
news:7c********************@magma.ca...
I wonder if somebody can give me a hint on how to convert an IDC script to
asp.net.
I have an asp.net application with one idc script.
I know .Net, but I've never worked with IDC, so bear with me. The server
calls my web application to dump data into database.
That's somewhat like the IDC file looks like:
Datasource: MyDatabase
Username: sa
Password: mypassowrd
SQLStatement:
+ INSERT MyTable
+ (transaction_number, receipt_number)
+ VALUES
+ (%transaction_number%, %receipt_number%)
I also submit to the party that will dump data the password and the user
name and protect this page. How do I
do it in .NET? I use forms authentication (SSL protected login page) for
other pages. I have to submit to the side that will be dumping data login
credentials, domain name, and the page that will execute scripts.
Please assist on how to handle setting the credentials and how to use
asp.net when they call the page on the other side.
Do I have to put the code for inserting values into database on page_load?
How do I grab this values from code-behind? How do I set the username and
pwd?
Thanks