freelanceprogrammers.org Forum Index » ASP

help


View user's profile Post To page top
leiyzju Posted: Wed Jul 09, 2003 6:46 pm


Joined: 09 Jul 2003

Posts: 1
help
Dear Mr/Madam:
I`m a beginer.I have some problems with learning ASP.NET.I can`t
find enough explanation for the error massage.
The program likes below:
(1)global.asax
<script language = "C#" runat = "server" >
protected void Application_Start(Object sender,EventArgs e)
{
Application["user_sessions"] = 0;
}
protected void Session_Start(Object sender,EventArgs e)
{
Application.Lock();
Application["user_sessions"] = (int)Application["user_sessions"]
+1;
Application.Unlock();
}
protected void Session_End(Object sender,EventArgs e)
{
Application.Lock();
Application["user_sessions"] = (int)Application["user_sessions"]-
1;
Application.Unlock();
}
</script>
(2)config.web
<configuration>
<system.web>
<compiliation debug = "true" />
<sessionstate cookieless = "false" />
</system.web>
<configuration>
(3)my.aspx
<%@ page language = "C#" debug = "true" %>
<html>
<head>
<script language = "C#" runat = "server" >
private void Page_Load(Object sender,EventArgs e)
{
Visitors.Text = "there is<b>"+Application
["user_sessions"].ToString()+"</b>visitors!";
}
</script>
<title></title>
</head>
<body>
<asp:Label id = "Visitors" runat = "server" />
<br>
</body>
</html>

The error message as follows:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference
not set to an instance of an object.

Source Error:


Line 6: public void Page_Load(Object sender,EventArgs e)
Line 7: {
Line 8: count.Text = Application["user_session"].ToString();
Line 9: }
Line 10: public void But1_Click(Object sender,EventArgs e)


How to deal with it?Wating for your reply.
Yours:leiyzju
July 9
Reply with quote
Send private message
View user's profile Post To page top
mcresin Posted: Wed Jul 09, 2003 6:56 pm


Joined: 09 Jul 2003

Posts: 1
help
What is count? It dosen`t look like you`ve declared it anywhere.

Doug Wilson | Internet Applications Developer | iX Webhouse
Tel : +2731 5669250 | Fax : +2731 5669260 | www.ix.co.za
Cell : 084 8000 255 | ICQ : 173155300 | www.autoworld.co.za

-----Original Message-----
From: leiyzju [mailto:leiyzju@...]
Sent: 09 July 2003 03:46
To: AspNetAnyQuestionIsOk@yahoogroups.com
Subject: [AspNetAnyQuestionIsOk] help

Dear Mr/Madam:
I`m a beginer.I have some problems with learning ASP.NET.I can`t
find enough explanation for the error massage.
The program likes below:
(1)global.asax
<script language = "C#" runat = "server" >
protected void Application_Start(Object sender,EventArgs e)
{
Application["user_sessions"] = 0;
}
protected void Session_Start(Object sender,EventArgs e)
{
Application.Lock();
Application["user_sessions"] = (int)Application["user_sessions"]
+1;
Application.Unlock();
}
protected void Session_End(Object sender,EventArgs e)
{
Application.Lock();
Application["user_sessions"] = (int)Application["user_sessions"]-
1;
Application.Unlock();
}
</script>
(2)config.web
<configuration>
<system.web>
<compiliation debug = "true" />
<sessionstate cookieless = "false" />
</system.web>
<configuration>
(3)my.aspx
<%@ page language = "C#" debug = "true" %>
<html>
<head>
<script language = "C#" runat = "server" >
private void Page_Load(Object sender,EventArgs e)
{
Visitors.Text = "there is<b>"+Application
["user_sessions"].ToString()+"</b>visitors!";
}
</script>
<title></title>
</head>
<body>
<asp:Label id = "Visitors" runat = "server" />
<br>
</body>
</html>

The error message as follows:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference
not set to an instance of an object.

Source Error:


Line 6: public void Page_Load(Object sender,EventArgs e)
Line 7: {
Line 8: count.Text = Application["user_session"].ToString();
Line 9: }
Line 10: public void But1_Click(Object sender,EventArgs e)


How to deal with it?Wating for your reply.
Yours:leiyzju
July 9






Yahoo! Groups Sponsor


ADVERTISEMENT

<http://rd.yahoo.com/M=244522.3512152.4794593.1261774/D=egroupweb/S=1705
006764:HM/A=1595055/R=0/SIG=1247d4o3g/*http:/ashnin.com/clk/muryutaitake
nattogyo?YH=3512152&yhad=1595055> Click Here!


<http://us.adserver.yahoo.com/l?M=244522.3512152.4794593.1261774/D=egrou
pmail/S=:HM/A=1595055/rand=594351035>

To unsubscribe from this group, send an email to:
AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.


[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
stephenhrees Posted: Wed Jul 09, 2003 7:41 pm


Joined: 09 Jul 2003

Posts: 4
help
try
count.Text = Convert.ToString(Application["user_session"]);
(check the function - it might be ConvertTo.String()
or
count.Text = ((int)Application["user_session"]).ToString();
etc

Steve.



.

----- Original Message -----
From: "leiyzju" <leiyzju@...>
To: <AspNetAnyQuestionIsOk@yahoogroups.com>
Sent: Wednesday, July 09, 2003 2:46 PM
Subject: [AspNetAnyQuestionIsOk] help


> Dear Mr/Madam:
> I`m a beginer.I have some problems with learning ASP.NET.I can`t
> find enough explanation for the error massage.
> The program likes below:
> (1)global.asax
> <script language = "C#" runat = "server" >
> protected void Application_Start(Object sender,EventArgs e)
> {
> Application["user_sessions"] = 0;
> }
> protected void Session_Start(Object sender,EventArgs e)
> {
> Application.Lock();
> Application["user_sessions"] = (int)Application["user_sessions"]
> +1;
> Application.Unlock();
> }
> protected void Session_End(Object sender,EventArgs e)
> {
> Application.Lock();
> Application["user_sessions"] = (int)Application["user_sessions"]-
> 1;
> Application.Unlock();
> }
> </script>
> (2)config.web
> <configuration>
> <system.web>
> <compiliation debug = "true" />
> <sessionstate cookieless = "false" />
> </system.web>
> <configuration>
> (3)my.aspx
> <%@ page language = "C#" debug = "true" %>
> <html>
> <head>
> <script language = "C#" runat = "server" >
> private void Page_Load(Object sender,EventArgs e)
> {
> Visitors.Text = "there is<b>"+Application
> ["user_sessions"].ToString()+"</b>visitors!";
> }
> </script>
> <title></title>
> </head>
> <body>
> <asp:Label id = "Visitors" runat = "server" />
> <br>
> </body>
> </html>
>
> The error message as follows:
>
> Object reference not set to an instance of an object.
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
>
> Exception Details: System.NullReferenceException: Object reference
> not set to an instance of an object.
>
> Source Error:
>
>
> Line 6: public void Page_Load(Object sender,EventArgs e)
> Line 7: {
> Line 8: count.Text = Application["user_session"].ToString();
> Line 9: }
> Line 10: public void But1_Click(Object sender,EventArgs e)
>
>
> How to deal with it?Wating for your reply.
> Yours:leiyzju
> July 9
>
>
>
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Reply with quote
Send private message
View user's profile Post To page top
useemeen Posted: Thu Oct 16, 2003 12:20 am


Joined: 16 Oct 2003

Posts: 1
help
i m developin a database in asp.net i m using sql server as back end... i m
using data grid to view data all the connection is ok but the problem is that
when ever i run my project i can not view my data grid ... all other lable are
visible i have check its visible property n it is true wht should i do ??



* ... an ever lasting friend ... *

*Üróój Çm£*


---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
sputnik75043 Posted: Thu Oct 16, 2003 3:10 am


Joined: 16 Oct 2003

Posts: 1
help
We`d prebably need to see your DataGrid databinding
code for that - - are you sure, that after you select
all your data, etc, that you do a DataGrid.DataBind
call?

And to answer your other question, Visible=True is the
default, so you would not need to set Visible=true
unless somewhere in your code, you have already set it
to false.


--- Üróój Çm£ <useemeen@...> wrote:
> i m developin a database in asp.net i m using sql
> server as back end... i m using data grid to view
> data all the connection is ok but the problem is
> that when ever i run my project i can not view my
> data grid ... all other lable are visible i have
> check its visible property n it is true wht should i
> do ??
>
>
>
> * ... an ever lasting friend ... *
>
> *Üróój Çm£*
>
>
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product
> search
>
> [Non-text portions of this message have been
> removed]
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> AspNetAnyQuestionIsOk-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
radha2v Posted: Wed Dec 21, 2005 12:56 pm


Joined: 21 Dec 2005

Posts: 1
help
hi
how can we place combo box in datagrid in windows application using c#
language. please any one knows reply me.

radha


Send instant messages to your online friends http://in.messenger.yahoo.com

[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
tarun_garg79 Posted: Wed Jan 11, 2006 4:36 pm


Joined: 11 Jan 2006

Posts: 1
help
Hi All,
I have a problem in rendering my web page.
The page contains a radio button which has some attribute value
having some database field value.
Problem comes when this data field contains data having double quote (").
The page gives a runtime error "unterminated string constant"
Please help me........


Best Regards,
_____________________________________
Tarun Kumar Garg



[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
peter_brunone Posted: Wed Jan 11, 2006 9:07 pm


Joined: 11 Jan 2006

Posts: 38
help
Can you show us the code, and an example of a line with this problem?

On 1/11/06, tarun garg <tarun.garg@...> wrote:
>
> Hi All,
> I have a problem in rendering my web page.
> The page contains a radio button which has some attribute value
> having some database field value.
> Problem comes when this data field contains data having double quote (").
> The page gives a runtime error "unterminated string constant"
> Please help me........
>
>
> Best Regards,
> _____________________________________
> Tarun Kumar Garg


[Non-text portions of this message have been removed]
Reply with quote
Send private message
View user's profile Post To page top
shawnarnwine Posted: Fri Jan 13, 2006 3:14 am


Joined: 13 Jan 2006

Posts: 3
help
Sounds as though you don`t the quotes set up correctly. Could you
post the code that is causing the error?

--- In AspNetAnyQuestionIsOk@yahoogroups.com, "tarun garg"
<tarun.garg@m...> wrote:
>
> Hi All,
> I have a problem in rendering my web page.
> The page contains a radio button which has some attribute
value
> having some database field value.
> Problem comes when this data field contains data having double
quote (").
> The page gives a runtime error "unterminated string constant"
> Please help me........
>
>
> Best Regards,
> _____________________________________
> Tarun Kumar Garg
>
>
>
> [Non-text portions of this message have been removed]
>
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help