aspCode runner generates which syntax of CODE? - asp.net

i'm using ASP RUNNER software to generate auto code, it generates this code
Function employeeRecord_Snippet1()
Response.Write "Your message"
End Function ' employeeRecord_Snippet1
now i don't understand that is it ASP.net code or ASP code ?

From the product homepage
"ASPRunnerPro creates professionally looking classic ASP applications enabling users to search, edit, delete and add data to the Oracle, SQL Server, MS Access, DB2, or MySQL databases."
http://xlinesoft.com/asprunnerpro/

Related

using asp.net dll in classic asp

I've followed this: http://www.codeproject.com/Articles/19535/NET-COM-Interop-Component-with-Classic-ASP-Part-I & http://bruceburge.com/2009/06/11/sharing-net-libary-dlls-between-asp-classic-and-aspnet/ to use asp.net dll in classic asp.
Step 7 listed in first URL didn't work me hence I followed steps given in second URL to to create installation. It works & can see URL in GAC. Unfortunately, it is not working in classic asp.
I tried "regsvcs" at command prompt but didn't work. have developed using C#
Anybody knows what I'm missing?
Update: I could see component under Component Services. I don't see method name under Interfaces & creating object of component is not working. am getting this error:
Expected end of statement on line:
set obj= server.CreateObject("my_dll_New.Class1");

get currently logged in username asp.net without c#

I'm working on a school project (so security isn't an issue) that requires me to get the name of the currently logged in user (to use as an argument for an SQL query for a datagrid)
Since the SQL query for the datagrid binding is stored in the aspx file, I can't use User.Identity.Name.ToString() like I would if this were in my c# file.
I am using the Microsoft authentication system that comes pre-built in visual studio asp.net webforms
You can use filter parameter of SQL Data-source.
Try using plain parameter (asp:Parameter). Yet another alternative is using SessionParameter or writing your own custom parameter (see this SO question: How to utilize ASP.NET current user name in SqlParameter without code-behind)
You should be able to use the following in the ASPX file:
<%=HttpContext.Current.User.Identity.Name %>
You obviously won't need the tags if you are plugging it into an existing code block...

How to open word documents in asp.net application

I am under the development of a job portal application.
For that I need resume upload functionality.
Now problem is how can I view the uploaded resume?
I am using ASP.NET with VB.
A good example of viewing word documents on a asp.net page can be viewed at http://www.aspsnippets.com/Articles/Display-Word-document-on-web-page-in-ASP.Net.aspx
You can try a third party library called "Doconut", here is a demo which actually shows a resume DOC opened in an asp.net website, similar to your requirements http://try.doconut.com/Ribbon.aspx
This could help anyone else having similar requirements.
Uploading document must have specific path.So try:
Dim objFile as System.IO.File
Dim sReader as System.IO.StreamReader
sReader = objFile.OpenText(“YourUploadedFilePAth”)
I am sure you can find much on this topic via Google as this is a consistently recurring topic
. Here are a few options:
Opening/Editing of Word Documents via ActiveX Controls - Word/Excel ActiveX Controls in ASP.NET
Via Office Object Model (basically a wrapper around COM Objects) - Automating Applications Using the Office Object Model
Via 3rd Party Libraries e.g. NetOffice (netoffice.codeplex.com)
You may use:
Dim filePath As String = "C:\Attachments\fileName.xls" -- any file format
System.Diagnostics.Process.Start(filePath)

Classic asp migration to windows 2008 RC

I am very new to asp classic application. The below code snippet is from a asp classic application which we are going to migrate to Windows Server 2008RC.
1.Set objConfig_Constantsinc = Server.CreateObject("Notion.Configuration")
2.Dim account
3.account = objConfig_Constantsinc.GetConfig("SQLAccount")
As per my understanding in line number 1 we are creating an instance of a COM class. Now in line number 3 using this instance we are trying to get some config data "SQLAccount" .
Here is my doubt. In classic ASP application where are we storing these type of configuration strings(For eg: "SQLAccount"). Is there any concept of global configuration file. Kindly guide me.
As stated in the comments & by yourself, the Notion.Configuration item is some kind of com object, if you're porting this to the new server you dont really have a problem (assuming you port the underlying storage mechanism, i.e. the com object could be storing the vars anywhere (Eg: sql, registry, files)
If for some reason you want to do away with the com object for storing configuration data (i.e. your question regarding the existence of a global configuration file) - there is a mechanism for doing this in Classic ASP.
Specifically, the global.asa file, commonly, the common.asa file is placed in the root of your site and exposes application variables that can be read from any asp file within your application.
More Details: http://msdn.microsoft.com/en-us/library/ms525316(v=vs.90).aspx
Declaring application level globals is easy:
Example from a global.asa:
<script language="VBScript" runat="Server">
Sub Application_OnStart
Application("SQLAccount") = "whatver"
End Sub
Example in any other asp page:
response.write Application("SQLAccount")
I would remind you though, that declaring unnecessary global vars is counterproductive & you should carefully choose what to expose at a global level to avoid confusion / duplicate items in memory.

Can I run vb script from C# application ?

Can I run vb script from C# application.Can anybody provide me vb script with exam
like on button click show message,if perticular panel is visible.
i don't think you can run vb script code inside c# code, but this How to call a VBScript file in a C# application?
could do the job
You can't execute VBScript directly in the same C# process, but you can execute it through a separate process using the Process class.
Process.Start("path to vbscript", "arguments if any");
If you are talking about client side on a browser, then this can only work on IE (the only browser that supports vbscript).

Resources