Click here to Skip to main content
15,909,091 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionwhat setting have to be made in web.config to send email from asp.net with c# Pin
developerit10-Mar-10 21:52
developerit10-Mar-10 21:52 
AnswerRe: what setting have to be made in web.config to send email from asp.net with c# Pin
Pranay Rana10-Mar-10 22:00
professionalPranay Rana10-Mar-10 22:00 
GeneralRe: what setting have to be made in web.config to send email from asp.net with c# Pin
developerit12-Mar-10 20:07
developerit12-Mar-10 20:07 
QuestionHow we send multiple sms Pin
lrsalunkhe10-Mar-10 21:47
lrsalunkhe10-Mar-10 21:47 
AnswerRe: How we send multiple sms Pin
SeMartens10-Mar-10 21:55
SeMartens10-Mar-10 21:55 
AnswerRe: How we send multiple sms Pin
jayantbramhankar11-Mar-10 0:26
jayantbramhankar11-Mar-10 0:26 
Questionhow to mail 3to 5 address using asp.net with c# Pin
developerit10-Mar-10 21:43
developerit10-Mar-10 21:43 
AnswerRe: how to mail 3to 5 address using asp.net with c# Pin
SeMartens10-Mar-10 21:51
SeMartens10-Mar-10 21:51 
GeneralRe: how to mail 3to 5 address using asp.net with c# Pin
ademsandeepreddy10-Mar-10 23:57
ademsandeepreddy10-Mar-10 23:57 
Questionjava script for stop page reloading Pin
vikas shukla10-Mar-10 21:39
vikas shukla10-Mar-10 21:39 
QuestionCreate Dynamic Crystal Report Pin
HatakeKaKaShi10-Mar-10 20:24
HatakeKaKaShi10-Mar-10 20:24 
QuestionAdd Images along with HTML markup at runtime into Panel/PlaceHolder Pin
THE SK10-Mar-10 19:13
THE SK10-Mar-10 19:13 
QuestionFrom address problem in Sending Mail Pin
K V Sekhar10-Mar-10 18:48
K V Sekhar10-Mar-10 18:48 
AnswerRe: From address problem in Sending Mail Pin
Abhijit Jana10-Mar-10 21:22
professionalAbhijit Jana10-Mar-10 21:22 
GeneralRe: From address problem in Sending Mail Pin
K V Sekhar10-Mar-10 23:36
K V Sekhar10-Mar-10 23:36 
GeneralRe: From address problem in Sending Mail Pin
Abhijit Jana10-Mar-10 23:48
professionalAbhijit Jana10-Mar-10 23:48 
GeneralRe: From address problem in Sending Mail Pin
K V Sekhar11-Mar-10 0:28
K V Sekhar11-Mar-10 0:28 
QuestionOPENOFFICE TOOL PROBLEM Pin
srinivaskalagara10-Mar-10 17:21
srinivaskalagara10-Mar-10 17:21 
QuestionHosting an asp web site Pin
coding freaks10-Mar-10 16:36
coding freaks10-Mar-10 16:36 
AnswerRe: Hosting an asp web site Pin
Not Active10-Mar-10 16:41
mentorNot Active10-Mar-10 16:41 
GeneralRe: Hosting an asp web site Pin
coding freaks10-Mar-10 17:49
coding freaks10-Mar-10 17:49 
QuestionWhere is the difference between inheriting inline and code-behind Pin
Gregory Gadow10-Mar-10 10:48
Gregory Gadow10-Mar-10 10:48 
Two test pages.

Test 1: Test1.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test1.aspx.vb" Inherits="Test1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <p>Test 1 - With codebehind.</p>
   
    <p><asp:Literal runat="server" ID="Output" /></p>
    </div>
    </form>
</body>
</html>
Test1.aspx.vb
VB
Partial Class Test1
    Inherits MyCompany.Web.BasePage

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Output.Text = MyUser.UserName
    End Sub
End Class


----------------------

Test 2: Test2.aspx
<%@ Page Language="VB" Inherits="MyCompany.Web.BasePage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
        Output.Text = MyUser.UserName
    End Sub
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <p>Test 2 - With inline.</p>
   
    <p><asp:Literal runat="server" ID="Output" /></p>
    </div>
    </form>
</body>
</html>


----------------------

Both pages inherit from a custom class, MyCompany.Web.BasePage, which itself is based on System.Web.UI.Page. The property MyUser is defined in BasePage and contains data about the user accessing the page.

Both pages work just fine when accessed. The difference is when editing the pages: with Test1, MyUser shows up in IntelliSense, I can access the object's properties and everything works exactly as I would expect. With Test2, the use of MyUser is flagged as a "not declared" error, and IntelliSense does not detect any properties on the object.

What is so frustrating is that on my previous development machine, Test2 worked as desired in the IDE. It is only now, after my primary machine had to be replaced (damned hard drive) that this problem has cropped up. Replacing inline code with codebehind is not feasable, as there are hundreds of pages that would have to be rewritten, not to mention overhead from doubling the number of files.

I have no idea why the two different coding styles should suddenly be acting differently. Is there an option checkbox that needs to be marked? Please, help me out!
AnswerRe: Where is the difference between inheriting inline and code-behind Pin
Not Active10-Mar-10 15:13
mentorNot Active10-Mar-10 15:13 
AnswerRe: Where is the difference between inheriting inline and code-behind Pin
Pranay Rana10-Mar-10 19:03
professionalPranay Rana10-Mar-10 19:03 
QuestionHow to get handle to webpart in WebPartZone? Pin
mittalpa10-Mar-10 10:38
mittalpa10-Mar-10 10:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.