OlgaBunkleys
New Member
Does ASP+ need to be supported by your browser? If so, is it supported by IE5 and Netscape?On the client side, any browser will do, just like with ASP. ASP+ has server controls (as I discussed in my article on 4Guys), and these generate HTML specific for the browser being used by the visitor. For example, if I visit with IE 5, DHTML will be returned to me, the client. If I am using Netscape 3.0, vanilla HTML will be returned. So, no, there is nothing special that the client needs to view ASP+ pages...Nice idea - the only thing that worries me is that it means trusting someone at Microsoft to write it so that it works. Those server-controls sound suspiciously like Design Time Controls, which have been around for a while and no-one I've ever met uses...<BR><BR>I guess I just don't trust the company that gave us FrontPage (and the dreaded Word "Save as HTML..." debacle) to write my HTML for me - I mean, they've consistently produced that worst HTML in the business. <BR><BR>Like the complied language stuff though.<BR><BR>DuncI know, when I first heard/saw the server controls I worried that they were the next "version" of DTCs, which I hate with a passion! However, these server controls really are sweet, take it from someone who's had the opportunity to play around with ASP+ for over a month.<BR><BR>In any case, the HTML generated is dependent upon the browser. If the visitor is using IE 4, say, DHTML is produced. I've seen these server controls display nice, valid HTML that Netscape 2 is happy with! They even do proper tabbing with tables, select boxes and such so that it is easy to read the resulting HTML! <BR><BR>I agree that FrontPage and any program that tries to write code for me when I didn't ask it to are pure evil. One of Visual InterDev 7's is to not touch your code at all: no changes to case, no properties automatically added, no mysterious HTML being introduced to your source... it's about time, eh? I read your article and must say am very thrilled at the coming of ASP+. Considering it doesn't use scripting languages though, I better get back into VB or try to pick up C#.<BR><BR>My question though is about these serverside controls. Basically it just seems they are the same HTML we are used to writing, as someone posted earlier these even look like the old DTCs I hate(my co-worker loves 'em...I can never dechiper his code).<BR><BR>Do these serverside controls have any added functionality at all? Can I simply use my HTML boxes and such and not loose anything.<BR><BR>Thanks.Hello Sean.<BR><BR>The server controls may seem similar to the HTML tags you use, but they offer two things: first, they encapsulate more complex code. While the simpler server controls, like asp:label, is pretty straightforward, there are more advanced server controls (and you can build your own!). For example, the Ad Rotator component is now packaged into a server control... rather than instantiating the component and calling its methods and setting its properties, you can do <asp:adrotator ... /> and specify the rotator schedule file and other information. The hunk of work that is needed to create the component and display it is done behind the scenes.<BR><BR>The second advantage is that these server controls help maintain state across Web pages... I know I'm not doing a great job of explaining this, but it's like the client-server model of the Internet is ignored, and it becomes more like a VB app. Rather than you having to worry about passing form values from one page to another, the server controls help do this for your automatically.<BR><BR>For example, say that you wanted to have a page where someone entered their age and it then printed out how many days they had been alive. This could be done with ASP like so (using a post-back form):<BR><BR><HTML><BODY><BR><FORM METHOD=POST><BR>What is your age? <INPUT TYPE=TEXT NAME=Age VALUE=http://aspmessageboard.com/archive/index.php/"<%=Request("Age")%>"><BR><BR><INPUT TYPE=SUBMIT><BR></FORM><BR><P><BR><% If Len(Request("Age")) > 0 and IsNumeric(Request("Age")) then %><BR>You have been alive for <%=CInt(Request("Age")) * 365%> days!<BR><% End If %><BR></BODY></HTML><BR><BR>Note that you have to concern yourself with what information is being passed back. With ASP+, you can use a server control and not worry about checking Request("Age")<BR><BR><script language=vb runat=server><BR>Sub SubmitButton_OnClick(Object Src, EventArgs E)<BR><BR>Dim strAge as String = Age.Value<BR>Message.Text = "You are " & CInt(strAge) * 365 & " days old!"<BR><BR>End Sub<BR></script><BR><HTML><BODY><BR><FORM METHOD=POST RUNAT=SERVER><BR>What is your age? <asp:textbox id="Age" runat=server/><BR><BR><P><asp:button id="SubmitButton" onclick="SubmitButton_OnClick" runat=server/><BR></FORM><BR><P><BR><asp:label id="Message" runat=server/><BR></BODY></HTML><BR><BR>(OK, this is all untested code so there is no guarantee that it will work, but hopefully you see the programming differences stylistically.)<BR><BR>If using things like asp:textbox make you uncomfortable, you can use HTML-like server controls... for example:<BR><BR><asp:textbox id="Bob" runat=server/><BR><BR>is the same as<BR><BR><input type=text name="Bob" runat=server><BR><BR>(Note the runat=server in the HTML tag... this tells ASP+ that it is a server control and not to be sent to the client as HTML.)<BR>Suppose I develop a serverside control with VB7 and upload it to my remote server (in my alloted directory) currently providing ASP service. Can my JScript or VBScript just call the control's functions and properties without any additional fuss?<BR><BR>Currently, any ActiveX control uploaded to a server has to register with the server before it can be manipulated by scripts. Most free webpage providers don't allow this registration. Can VB7 solve that problem?<BR>ASP+ supports what we call "xcopy" deployment. This means that you *do not* need to register a .NET component on the server in order to invoke it from a page. Regsevr32 is dead.<BR><BR>All you have to do is upload the file into the "bin" directory immediately under the root of your application directory. This will implictly register it for all code called/used within your application.<BR><BR>One additional benefit -- the dll of the uploaded code *is not* locked on disk. To replace it, just copy over the file. ASP+ will automatically detect that it has changed and start using it on subsequent requests.<BR><BR>Our hope is that these innovations will make developing server applications much, much, much more easy.