F
Farooq Khan
why does Response.Write in a method of code-beind class when called from
inpage code (i.e in <%---%>), after creating object of that class, fails
when called
while it works perfectly ok while calling the same method same way except
for creating object instead directly calling the method?
i get this when trying to do that:-
**************************************************
Response is not available in this context.
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.Web.HttpException: Response is not available in
this context.
Source Error:
Line 32: for (a=1; a<8; a++)
Line 33: {
Line 34: Response.Write("<H"+a.ToString()+">Heading
<H"+a.ToString()+">");
Line 35:
Line 36: }
**************************************************
i'm new to the .NET stuff and was playing around with it when came across
above......let me know if i'm doing something wrong there.
Thanks in advance.
Best Regards,
Farooq Khan
inpage code (i.e in <%---%>), after creating object of that class, fails
when called
while it works perfectly ok while calling the same method same way except
for creating object instead directly calling the method?
i get this when trying to do that:-
**************************************************
Response is not available in this context.
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.Web.HttpException: Response is not available in
this context.
Source Error:
Line 32: for (a=1; a<8; a++)
Line 33: {
Line 34: Response.Write("<H"+a.ToString()+">Heading
<H"+a.ToString()+">");
Line 35:
Line 36: }
**************************************************
i'm new to the .NET stuff and was playing around with it when came across
above......let me know if i'm doing something wrong there.
Thanks in advance.
Best Regards,
Farooq Khan