Showing posts with label working. Show all posts
Showing posts with label working. Show all posts

Monday, March 26, 2012

Newbie: parser error when using a Literal tag

Here goes.. I'm starting with a working application and am trying to make some modifications and things aren't going well.

I wanted to add a Literal tag to a page like in this article:
http://www.odetocode.com/Code/82.aspx

But I keep getting a parser error on my page:
Parser Error Message: The base class includes the field 'stylesheet', but its type (System.Web.UI.WebControls.Literal) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).

Here's my code:
-- from .aspx:


<LINK href="http://links.10026.com/?link=<asp:Literal id="stylesheet" runat="Server" />" type="text/css" rel="stylesheet">

-- from .aspx.vb:


Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Data.SqlClient
Imports System.Text
Imports System.Web.Security
Imports blueinc.BusinessLogicLayer
Imports blueinc.DataAccessLayer

Namespace myCompany.Web

Public Class _default
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

End Sub
Protected WithEvents dlEvents As System.Web.UI.WebControls.DataList
Protected WithEvents PlaceHolder As System.Web.UI.WebControls.PlaceHolder
Protected WithEvents lnkRegister As System.Web.UI.WebControls.LinkButton
Protected WithEvents lblUserLoggedOn As System.Web.UI.WebControls.Label
Protected WithEvents Separator As System.Web.UI.WebControls.Label
Protected WithEvents lnkLogOff As System.Web.UI.WebControls.LinkButton
Protected WithEvents dgClinics As System.Web.UI.WebControls.DataGrid

'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Dim EventsTable As BusinessLogicLayer.Events = New BusinessLogicLayer.Events
Public ClinicsTable As BusinessLogicLayer.Clinics = New BusinessLogicLayer.Clinics
Protected stylesheet As System.Web.UI.WebControls.Literal

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim uc As Control = Page.LoadControl("UserControls/Login.ascx")

If Not Request.IsAuthenticated Then
PlaceHolder.Controls.Add(uc)
lblUserLoggedOn.Visible = False
lnkLogOff.Visible = False
Else
Dim UserDetails As myCompany.BusinessLogicLayer.UserDetails
UserDetails = Session("UserDetails")

PlaceHolder.Controls.Remove(uc)
If Not IsNothing(UserDetails.UserName) Then
lblUserLoggedOn.Text = "Currently logged on as " & UserDetails.UserName
Else
lblUserLoggedOn.Text = "Authenticated but logged on as NO-ONE!"
End If
lblUserLoggedOn.Visible = True
lnkLogOff.Visible = True

End If

If Not IsPostBack Then
dlEvents.DataSource = EventsTable.GetList
dlEvents.DataBind()

dgClinics.DataSource = ClinicsTable.GetList
dgClinics.DataBind()

Dim OrgName As String

OrgName = Session("org")
If OrgName = "" Then
OrgName = Request("org")
End If
If OrgName = "" Then
OrgName = "foo"
End If

stylesheet.Text = OrgName & "/styles.css"
End If

End Sub

I would have snipped the code-behind, but I figured I'd end up snipping the offending line... I'd be happy to provide more info if required.

J<LINK href="http://links.10026.com/?link=" type="text/css" rel="stylesheet" id="stylesheet" runat="server" />

Protected WithEvents stylesheet As System.Web.UI.HtmlControls.HtmlGenericControl

' code:
stylesheet.Attributes.Add("href", "whatever value")


I think you're confusing the parser with nested tags. Try to make stylesheet a string instead of a literal and inject its value using <%= %>.
Even better, make the LINK tag runat=server (and declare it as a HtmlGenericControl in the code-behind) and set its properties using the Attributes collection.
Thank you both, its working now. I am making the link runat=server.

And when I took the literal out of the <link/> it also worked, so at least I know what the problem was!

Cheers,
J

Newbie: pages working only above the root

It does rather sound like the server isn't setup correctly.
If ASPX pages are not working in the root of the site, then it could be that
IIS doesn't have the correct script mappings setup.

Asking the ISP to run aspnet_regiis -r and aspnet_regiis -c may fix the
problem by reconfiguring the IIS script mappings, and redeploying the client
script files to each application folder.

--
Regards

Tim Stephenson MCSD.NET
Charted MCAD & MCSD.NET Early Achiever

"James Campbell" <james@dotnet.itags.org.stuttersystems.com> wrote in message
news:O5NW9idkDHA.2616@dotnet.itags.org.TK2MSFTNGP11.phx.gbl...
> I have a site hosted with a company in the US who it seems have given me a
> dedicated server for one of my sites:
> http://216.133.81.184/
> 1. Firstly, I can upload files to the wwwroot (directly into the root) as
> this seems to be set as the home directory
> a. Is this the right way to do it, as I have never seen this before
?
> 2. Classic ASP works in the root: http://216.133.81.184/test.asp
> 3. asp.net (using vb) does not work in the root:
> http://216.133.81.184/hello3.aspx
> 4. But does asp.net works in a sub folder:
> http://216.133.81.184/carresa_site/hello3.aspx
> Has the .net framework been installed properly ?
> Have the host setup the server correctly ??
> Any ideas would be appreciated.
> Thanks
> James CampbellHi Tim,

Thanks for the reply. I have spoke to a few people now about this and your
comments echo everybody else's.

"host misconfiguration"

Thanks
James

"Tim Stephenson" <tim.stephenson@.archant.co.uk> wrote in message
news:e5UePWwkDHA.2364@.TK2MSFTNGP11.phx.gbl...
> It does rather sound like the server isn't setup correctly.
> If ASPX pages are not working in the root of the site, then it could be
that
> IIS doesn't have the correct script mappings setup.
> Asking the ISP to run aspnet_regiis -r and aspnet_regiis -c may fix the
> problem by reconfiguring the IIS script mappings, and redeploying the
client
> script files to each application folder.
> --
> Regards
> Tim Stephenson MCSD.NET
> Charted MCAD & MCSD.NET Early Achiever
>
> "James Campbell" <james@.stuttersystems.com> wrote in message
> news:O5NW9idkDHA.2616@.TK2MSFTNGP11.phx.gbl...
> > I have a site hosted with a company in the US who it seems have given me
a
> > dedicated server for one of my sites:
> > http://216.133.81.184/
> > 1. Firstly, I can upload files to the wwwroot (directly into the root)
as
> > this seems to be set as the home directory
> > a. Is this the right way to do it, as I have never seen this before
> ?
> > 2. Classic ASP works in the root: http://216.133.81.184/test.asp
> > 3. asp.net (using vb) does not work in the root:
> > http://216.133.81.184/hello3.aspx
> > 4. But does asp.net works in a sub folder:
> > http://216.133.81.184/carresa_site/hello3.aspx
> > Has the .net framework been installed properly ?
> > Have the host setup the server correctly ??
> > Any ideas would be appreciated.
> > Thanks
> > James Campbell

Saturday, March 24, 2012

Newbie:please help me 'display' this on a simple .aspx page

I understand that store procedures are the recommended way to handle SQL
queries from an ASP application. However I am working on a small academic
assignment and I just need to get this over with. I created the store
procedure but now the teacher didn't accept that, as he is concerned he
would need to install the store procedure in Query Analyzer from his end.
Can you please clarify how I would be to do the following using a Select
Statement (VB.NET, ASP.NET 2.0):
Dim myNextPage
myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
Dim myString
myString = "SELECT Employee From Pubs " _
& "WHERE job_id = " & TxtBox1.Text And
& "WHERE employee_name = " & TxtBox2.Text And
& "WHERE hire_date = " & TxtBox3.Text
'Now I want to:
If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
(hire_date = TxtBox3.Text) Then
Response.Redirect("myNextPage")
'Then on Next page I would like to display label.Text = "Your
information matched and I can go ahead to reset your password in AD..."
'However doing:
label.Text = "Your info matched and I can go ahead and reset your
password in AD..." ' This wouldn't work. Where do I need to put this
Label.Text ="..." ?
Else
Response.Redirect("myNextPage")
'Display on next page Label.Text = "The phrase(s) you typed didn't
match. Please click back button and resubmit info."
'If possible, I would like to display all phrases that did not match
in 'myNextPage', so that user would know which ones he didn't answer
correctly.
End If
End SubIn that case u may choose to write all logic of stored procedure in asp.net
itsself.
-jignesh
www.dotnetjini.com
"Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
>
Ok, if you can't show me the SQL part OK, but could you help me with on how
to display whatever variable I capture from the SQL query on .ASP.NET ?
I tried to use Response.Write(TextBox1.Text) but that didn't returned
satisfactory results. I understand I shouldn't use Response.Write and
therefore I attempted to create a Label1.Text to display whatever
information I got from SQL. The problem is that I do Label1.Text =
InfoFromSQL and that doesn't work either. It returns nothing on the
Label1.Text.
'Then on Next page I would like to display label.Text = "Your
'information matched and I can go ahead to reset your password in AD..."
' 'However doing:
' label.Text = "Your info matched and I can go ahead and reset your
' password in AD..." ' This wouldn't work. Where do I need to put this
' Label.Text ="..." ?
I am trying to
"Jignesh Desai" <jignesh_desai@.hotmail.com> wrote in message
news:O8z%238QhJFHA.2356@.TK2MSFTNGP14.phx.gbl...
> In that case u may choose to write all logic of stored procedure in
> asp.net
> itsself.
> -jignesh
> www.dotnetjini.com
> "Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
> news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
>
Labels do not produce actual HTML control on the client-side so have no way
to postback to the server. I believe you can store you texts in Session
variable.
Session["yourmsg"] = "Your info matched and I can go ahead and reset your
password in AD..."
Then in the other page:
label.Text = CStr(Session["yourmsg"])
You may use Session variable to store anything, including ArrayList and
access it on other pages in the same session. Just rememeber to CType it
back when you retrieve it.
"Marlon Brown" <marlon_brownj@.hotmail.com> bl
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl g...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
>

Newbie:please help me display this on a simple .aspx page

I understand that store procedures are the recommended way to handle SQL
queries from an ASP application. However I am working on a small academic
assignment and I just need to get this over with. I created the store
procedure but now the teacher didn't accept that, as he is concerned he
would need to install the store procedure in Query Analyzer from his end.
Can you please clarify how I would be to do the following using a Select
Statement (VB.NET, ASP.NET 2.0):

Dim myNextPage
myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.

Dim myString
myString = "SELECT Employee From Pubs " _
& "WHERE job_id = " & TxtBox1.Text And
& "WHERE employee_name = " & TxtBox2.Text And
& "WHERE hire_date = " & TxtBox3.Text

'Now I want to:
If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
(hire_date = TxtBox3.Text) Then
Response.Redirect("myNextPage")
'Then on Next page I would like to display label.Text = "Your
information matched and I can go ahead to reset your password in AD..."
'However doing:
label.Text = "Your info matched and I can go ahead and reset your
password in AD..." ' This wouldn't work. Where do I need to put this
Label.Text ="..." ?

Else
Response.Redirect("myNextPage")
'Display on next page Label.Text = "The phrase(s) you typed didn't
match. Please click back button and resubmit info."
'If possible, I would like to display all phrases that did not match
in 'myNextPage', so that user would know which ones he didn't answer
correctly.

End If

End SubIn that case u may choose to write all logic of stored procedure in asp.net
itsself.

-jignesh
www.dotnetjini.com

"Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub
Ok, if you can't show me the SQL part OK, but could you help me with on how
to display whatever variable I capture from the SQL query on .ASP.NET ?
I tried to use Response.Write(TextBox1.Text) but that didn't returned
satisfactory results. I understand I shouldn't use Response.Write and
therefore I attempted to create a Label1.Text to display whatever
information I got from SQL. The problem is that I do Label1.Text =
InfoFromSQL and that doesn't work either. It returns nothing on the
Label1.Text.

'Then on Next page I would like to display label.Text = "Your
'information matched and I can go ahead to reset your password in AD..."
' 'However doing:
' label.Text = "Your info matched and I can go ahead and reset your
' password in AD..." ' This wouldn't work. Where do I need to put this
' Label.Text ="..." ?

I am trying to
"Jignesh Desai" <jignesh_desai@.hotmail.com> wrote in message
news:O8z%238QhJFHA.2356@.TK2MSFTNGP14.phx.gbl...
> In that case u may choose to write all logic of stored procedure in
> asp.net
> itsself.
> -jignesh
> www.dotnetjini.com
> "Marlon Brown" <marlon_brownj@.hotmail.com> wrote in message
> news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl...
>> I understand that store procedures are the recommended way to handle SQL
>> queries from an ASP application. However I am working on a small academic
>> assignment and I just need to get this over with. I created the store
>> procedure but now the teacher didn't accept that, as he is concerned he
>> would need to install the store procedure in Query Analyzer from his end.
>> Can you please clarify how I would be to do the following using a Select
>> Statement (VB.NET, ASP.NET 2.0):
>>
>>
>>
>> Dim myNextPage
>> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
>>
>> Dim myString
>> myString = "SELECT Employee From Pubs " _
>> & "WHERE job_id = " & TxtBox1.Text And
>> & "WHERE employee_name = " & TxtBox2.Text
>> And
>> & "WHERE hire_date = " & TxtBox3.Text
>>
>> 'Now I want to:
>> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
>> (hire_date = TxtBox3.Text) Then
>> Response.Redirect("myNextPage")
>> 'Then on Next page I would like to display label.Text = "Your
>> information matched and I can go ahead to reset your password in AD..."
>> 'However doing:
>> label.Text = "Your info matched and I can go ahead and reset your
>> password in AD..." ' This wouldn't work. Where do I need to put this
>> Label.Text ="..." ?
>>
>> Else
>> Response.Redirect("myNextPage")
>> 'Display on next page Label.Text = "The phrase(s) you typed didn't
>> match. Please click back button and resubmit info."
>> 'If possible, I would like to display all phrases that did not
>> match
>> in 'myNextPage', so that user would know which ones he didn't answer
>> correctly.
>>
>> End If
>>
>> End Sub
>>
>>
Labels do not produce actual HTML control on the client-side so have no way
to postback to the server. I believe you can store you texts in Session
variable.

Session["yourmsg"] = "Your info matched and I can go ahead and reset your
password in AD..."

Then in the other page:
label.Text = CStr(Session["yourmsg"])

You may use Session variable to store anything, including ArrayList and
access it on other pages in the same session. Just rememeber to CType it
back when you retrieve it.

"Marlon Brown" <marlon_brownj@.hotmail.com> bl
news:e7u1sygJFHA.2772@.TK2MSFTNGP14.phx.gbl g...
> I understand that store procedures are the recommended way to handle SQL
> queries from an ASP application. However I am working on a small academic
> assignment and I just need to get this over with. I created the store
> procedure but now the teacher didn't accept that, as he is concerned he
> would need to install the store procedure in Query Analyzer from his end.
> Can you please clarify how I would be to do the following using a Select
> Statement (VB.NET, ASP.NET 2.0):
>
> Dim myNextPage
> myNextPage = "ConfirmInput.aspx" 'On this page I put a label.Text there.
> Dim myString
> myString = "SELECT Employee From Pubs " _
> & "WHERE job_id = " & TxtBox1.Text And
> & "WHERE employee_name = " & TxtBox2.Text And
> & "WHERE hire_date = " & TxtBox3.Text
> 'Now I want to:
> If (TxtBox1.Text = job_id ) And (employee_name = TxtBox2.Text) And
> (hire_date = TxtBox3.Text) Then
> Response.Redirect("myNextPage")
> 'Then on Next page I would like to display label.Text = "Your
> information matched and I can go ahead to reset your password in AD..."
> 'However doing:
> label.Text = "Your info matched and I can go ahead and reset your
> password in AD..." ' This wouldn't work. Where do I need to put this
> Label.Text ="..." ?
> Else
> Response.Redirect("myNextPage")
> 'Display on next page Label.Text = "The phrase(s) you typed didn't
> match. Please click back button and resubmit info."
> 'If possible, I would like to display all phrases that did not match
> in 'myNextPage', so that user would know which ones he didn't answer
> correctly.
> End If
> End Sub

Thursday, March 22, 2012

newby needs no record found help

ok I'm new to ASP but I have everything working great I have a form in which client can look up status i want to be able to redirect to a no record found page when a wrong id number is entered here is website http://www.cargogroupllc.com/cargotracking.asp example of good record enter 12321 example of bad record 33333333 please help this is last thing I need to accomplishShow the code of the page, then I can help you!
Edited by SomeNewKid. Please post code between<code> and</code> tags.



ASP protion of page

<%
strSearch = Request.Form("search")

If strSearch <> "" Then
Dim strConnect, SQL
Dim RS
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("securefiles/ITtracking.mdb") & ";"

SQL = "SELECT * FROM ITTable WHERE INSTR(ITTable.ITNumber,'" & strSearch & "')"

Set RS = Server.CreateObject("Adodb.Recordset") 'Used for pulling main categories from DB
RS.Open SQL,strConnect

'If Len(strSearch) > 1 AND LCase(strSearch) = LCase(RS("Name")) Then
Response.Write RS("ITNumber") & "<BR><BR>"
Response.Write RS("DateArrived") & "<BR><BR>"
Response.Write RS("RefNumber") & "<BR><BR>"
Response.Write RS("Quantity") & "<BR><BR>"
Response.Write RS("PUDate") & "<BR><BR>"
Response.Write RS("PUNumber") & "<BR><BR>"
Response.Write RS("OriginalIT") & "<BR><BR>"
Response.Write RS("ValidatedIT") & "<BR><BR>"
Response.Write RS("CustomsRelease") & "<BR><BR>"
Response.Write RS("ShippingTally") & "<BR><BR>"
Response.Write RS("NVOCCRelease") & "<BR><BR>"
Response.Write RS("PaperlessIT") & "<BR><BR>"
'End If

'If Len(strSearch) <= 0 Then
'Response.Write "Sorry no record & "<BR>"
'Response.Write RS(sorry no record) & "<BR><BR>"

'End If

RS.MoveNext

RS.Close

End If

%>

newcomer help

I'm working on a project in ASP.NET with a lot of VB behind it. When itis finished, we would like to be able to sell the product to othercompanies but we do not want all of our code visible for them to modifyor use for their own. Therefore, is there some way I can compile any ofif into a DLL or EXE or something like that? I'm not exactly sure howto do it or what my options are, but it needs to:
- Still be completely functional with database querying
- Fully working with no loss of functionality

Also, if this is possible, will I have to still have the source codewith it? Any help in protecting this for me would be most appreciated.
Thanks,
Andrew

With ASP.NET you don't have to deploy the code on the web server. Only the dlls inside the bin folder is required.


Thank you for your reply... the only problem is, I have absolutely no clue what you are talking about.
I truly am a newcomer with this and I pretty much need to be babied through it.
putting your codebehind files on the server will work - they will be compiled when you request the asp.net page.
If you want to protect your code, then the best thing to do is to compile them (into a DLL)
If you use Visial Studio, when you run your application, VS.NET willmake your codebehind pages into a DLL and place it in the BIN folder atthe root of your application foler.
To move it to a production server, you copy the BIN folder and your ASPX pages and plonk them on the server.
Job done.
If you are hand coding the pages, then you'll need to use the command line and compile them before placing them on the server.
e.g
on the command line you'd do this to compile:
C:\Inetpub\wwwroot\WebApplication>csc.exe /nologo /target:library /out:bin/Webapplication.dll *.cs
have a look at the article
http://www.thecodeproject.com/aspnet/devaspoutvs.asp
hope it helps you out a little.

also visit this thread --> http://forums.asp.net/974687/ShowPost.aspx

Friday, March 16, 2012

News Ticker

Hi,
I am currently working on a site and i need to implement a News Ticker into the Main Page i have and be display general information to users.
So i am looking for some examples in .Net everthing i have seen is done in Applets.
Could someone please point me in the right direction.

Thanks, RonMaybe you should take a look at htis product:

http://www.richcontentrotator.com/home.aspx
Hi freind,

I am facing the same problem you used to have. I tried to view the website that was sent to you but didn't find any help could you please advice me if you can.

Thanks :)