Hi!
First of all I like to thank for the support I got from this forum when I learnt ASP. I wish to get the same for .NET. I am a ASP.NET beginner. I am writing a small webbased application for my personal use. I want to access a dataset object (in dll) from an asp page. Here is the source code :
========
add.aspx
========
<%@ Page Language="
VB" Debug="True" %>
<%@ import Namespace="eMarker" %>
<script runat="server">
sub page_load (source as object, e as eventargs)
Dim objdll as new emarker.App()
Dim result as String
if session("userid")="" then
response.redirect("default.aspx")
end if
if lcase(request.Querystring("action"))="category" then
result=objdll.catList("select * from category order by catname","category")
================================================== ================
I want to access the objds dataset object from here to bind it to datalist control.
================================================== ================
end if
end sub
</script>
<html>
<head>
</head>
<body>
'''''''''''''''' datalist control code goes here ''''''''''''
</body>
</html>
==========
eMarker.vb (complied as dll)
==========
Option explicit
Imports System
Imports System.Data
Imports System.Data.sqlclient
Namespace eMarker
public Class App
' ODBC Configuration
private function DBSettings() as String
dim DSN as String
DSN="Server=localhost; Database=eMarker; uid=x; pwd=x;"
return(DSN)
End function
'Query to list the categories
public function CatList(SQL as string,tblname as string) as string
Dim objConn as new sqlConnection(DBSettings())
Dim objCmd as new sqlDataAdapter(SQL,objConn)
Dim objds as new dataset
Dim i as integer
Dim output as string
objCmd.fill(objds,tblname)
================================================== ==================
I want to access the above dataset object from the add.aspx page so that I can display the selected records in the datalist control.
================================================== ==================
End function
End Class
End Namespace
''''' End of code '''''
Any help please ??
Arul Kumar.PA