Showing posts with label vs2005. Show all posts
Showing posts with label vs2005. Show all posts

Wednesday, March 28, 2012

Did I miss something during installation of AJAX 1.0v?

Hi everyone;

I'm using VS2005 and I've just installed AJAX and it works but in the source view it underlines Script Manager, UpdatePanel, contenttemplate and controls under contenttemplate. I guess I missed something that I don't know:) My simple page code is belove:

Thanks... Kaan ?ZGEN

<%

@dotnet.itags.org.PageLanguage="VB"MasterPageFile="~/Copy of Turuncu.master"AutoEventWireup="false"CodeFile="DNM2.aspx.vb"Inherits="DNM2"title="Untitled Page" %>

<%

@dotnet.itags.org.RegisterSrc="Menu.ascx"TagName="Menu"TagPrefix="uc1" %>

<

asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder1"Runat="Server"><asp:ScriptManagerid="ScriptManager1"runat="server"/>

<asp:UpdatePanelid="UpdatePanel1"runat="server"UpdateMode="Conditional"><contenttemplate><asp:Labelid="Label1"runat="server"Text="Label"></asp:Label><asp:Buttonid="Button1"runat="server"Text="Button"></asp:Button></contenttemplate></asp:UpdatePanel> <asp:LabelID="Label2"runat="server"Text="Label"></asp:Label><asp:LoginID="Login1"runat="server"></asp:Login><uc1:MenuID="Menu1"runat="server"/>

</

asp:Content>Have you installed SP1 for VS 2005? That can happen if you haven't.

Is there such service pack?? Thanks I didn't know it... :) I'll try and let you know if solved..

Kaan ?ZGEN


Hi mdenn;

Yes that was the problem; now because of you (sayende) I got SP1 and my problem is solved

Thanks..

Kaan ?ZGEN

Monday, March 26, 2012

Design approaches, AJAX of Master pages


Hello !

I'm migrating a website, all done with frames, from VS2003 to VS2005.
The layout of the website is a classical three columns with a header and a footer.

I want to remove frames but I would like advice on wether to use Master page or only AJAX.

Using AJAX, I would have one main page with the header and left column, clicking options on it
would load a HTML, CSS and javascript in the center column.
Fast and responsive but maybe hard to maintain and test.

Using a Master page, I guess I would have less changes to do since all the placeholders of the master page
would now be set as children of the master page. I haven't used Master pages yet so maybe
I don't understand the technology correctly.

Does anyone had the same concerns?
Can anyone tell me the pros and cons of this ?
Should I use a mix of the two approaches ?

My english is not perfect and I'm sorry for that, don't hesitate to ask for clearer details.

Thanks for any help !
Claude

You are correct - you do not understand the pratice of master pages correctly.

Masterpages in the Visual Studio 2005 enviroment are design time only. They are used as a way to manage a single layout across multiple content pages. When your site is complied or rendered, you end up with 1 page only. Masterpages should not be confused with frames in any way shape or form, they are not the same technology at all.

To understand this better - basically what you are doing is defining your layout, graphics, wrappers...etc in a master page. This is to maintain consistancy across all pages that would incorporate the design of that master page. So you can imagine a top header, a left column with links, and a center content area that you'd leave blank. In your content pages, you'd create the elements required to render content in that center area, without having to redesign, or duplicate the top and left column on each page. This is DESIGN TIME only.

When the pages are created and rendered. It'd be exactaly the same as designing your layout on each and every page. The pages are combined and sent down to the browser as a single html page, and nobody is the wiser.

To answer you're question. You should use Master Pages, AND javascript and Css (if thats your chosen technology) to render your pages. Using Masterpages for your layouts, and javascript css to render the center areas.

Master pages are "templates" that you build content pages around. They are not render time "frames".

Saturday, March 24, 2012

Deploying Atlas in IIS

Hi,

I've got a little problemwhen deploying my TreeView Atlas Example in IIS. I'm working on WinXP PRo SP2. Publishing the website from VS2005 is not a problem but when I want to view it in a browser i've got the following error:

XML analysis error : malformed Site: http://192.168.0.169/Test/FirstTreeView.aspxLine Number 1, Column 2: < % @dotnet.itags.org. Page Language="C # "% > - ^
Pls I need help

What is your sample doing? It looks like it's trying to parse the server aspx page itself as XML, which would not work. Does your web site run correctly before you deploy it?

David


Thanks for replying. My sample is a TreeView which DataSource is an XML File. I've got 2 update panels, on one, there is the update panel and the second show the selected nodes of the Treeview. It works fine before deploying it in IIS. I tried it on a friend's machine and the deployment works (Windows Server 2003, IIS 6.0). Do we then need to have IIS 6.0 in order to deploy coveniently atlas applications on IIS?

Here is my source code:

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<script runat="server">
void dataBound(Object sender, TreeNodeEventArgs e)
{
// Determine the depth of a node as it is bound to data.
// If the depth is 1, show a check box.
if (e.Node.Depth == 2)
{
e.Node.ShowCheckBox = false;
}
else
{
e.Node.ShowCheckBox = false;
}
}

protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
//If a node is selected, display the text in the right table
//Message.Text = TreeView1.SelectedNode.Text;
if (TreeView1.SelectedNode.Selected)
{
foreach(TreeNode node in TreeView1.SelectedNode.ChildNodes)
{
Message.Text += node.Text + "<br>";
}
}
else
{
Message.Text = "No Item Selected";
}
}

protected void Button1_Click(object sender, EventArgs e)
{
Message.Text="";
}
</script
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>First TreeView with an XML File</title>
<style type="text/css">
div.global
{
width:100%;
margin:0px;
border:1px solid #99ccff;
line-height:150%;
}
div.header,div.footer
{
padding:0.5em;
color:white;
background-color:#99ccff;
clear:left;
}
div.left
{
float:left;
width:200px;
margin:0;
padding:1em;
}
div.right
{
margin-left:270px;
border-left:1px solid #99ccff;
padding:1em;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager EnablePartialRendering=true ID=ScriptManager runat=server/>
<div class=global>
<div class="header">Dynamic Atlas Tree View</div>
<div class=left>
<atlas:UpdatePanel ID=up1 RenderMode=Inline Mode=Conditional runat=server>
<ContentTemplate>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="XDS" OnTreeNodeDataBound="dataBound" ShowCheckBoxes=None OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" ShowLines=true>
<DataBindings>
<asp:TreeNodeBinding DataMember="Kpf" ValueField="ID" TextField="Name"/>
<asp:TreeNodeBinding DataMember="Activity" ValueField="Value" TextField="Value"/>
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="XDS" runat="server" DataFile="~/XMLTVDataSource.xml"></asp:XmlDataSource>
</ContentTemplate>
</atlas:UpdatePanel>
</div>
<div class=right>
<atlas:UpdatePanel ID=up2 runat=server Mode=Conditional RenderMode=Inline>
<ContentTemplate>
Selected elements<hr /><br />
<asp:Label ID=Message runat=server></asp:Label>
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Clear All" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID=TreeView1 EventName=SelectedNodeChanged />
</Triggers>
</atlas:UpdatePanel>
</div>
<div class=footer>KPF Nord</div>
</div
</form>
</body>
</html>


I've fixed it. I re-installed IIS and .NET Framework 2.0. Latter i followed this:

All is OK Thanks