|
So, copy all the code from the master page into the actual page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I allready tried that, ive got a error messages,
What i did , copy all the default.master code and paste on the default.aspx.... within this lines:
<%@ Master Language="C#" CodeFile="Default.master.cs" Inherits="Default_master" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
but, still ve this error messages
Validation (Internet Explorer 6): Content is not supported outside 'script' or 'asp:content' regions.
Element 'menu' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'SiteMapPath' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'LoginStatus' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'contentplaceholder' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'menu' is not a known element. This can occur if there is a compilation error in the Web site.
Element 'sitemapdatasource' is not a known element. This can occur if there is a compilation error in the Web site.
HERE THE HOLE CODE
<%@ Page Language="C#" MasterPageFile="~/Default.master" Title="Your Name Here | Home"
CodeFile="Default.aspx.cs" Inherits="Default_aspx" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div class="header">
<h1>Control de Dispositivos</h1>
<h2>Melissa Contreras & Joan Miramontes</h2>
<asp:menu id="menua" runat="server"
datasourceid="SiteMapDataSource1"
cssclass="menua"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2" />
<div class="nav">
<asp:SiteMapPath id="SiteMapPath1" runat="Server" PathSeparator=" > " RenderCurrentNodeAsLink="true" />
|
<asp:LoginStatus ID="LoginStatus1" Runat="server" />
</div>
</div>
<asp:contentplaceholder id="Main" runat="server" />
<div class="footerbg">
<div class="footer">
<asp:menu id="menub" runat="server"
datasourceid="SiteMapDataSource1"
cssclass="menub"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2" />
Copyright © 2007 MCJM Co.
</div>
</div>
<asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" />
</form>
</body>
</html>
<asp:content id="Content1" contentplaceholderid="Main" runat="server" >
<div class="shim column" ></div>
<div class="page" id="home">
<div id="sidebar">
<asp:loginview id="LoginArea" runat="server">
<AnonymousTemplate>
<asp:login id="Login1" runat="server">
<layouttemplate>
<div class="login">
<h4>Login to Site</h4>
<asp:label runat="server" id="UserNameLabel" CssClass="label" associatedcontrolid="UserName">User Name</asp:label>
<asp:textbox runat="server" id="UserName" cssclass="textbox" accesskey="u" />
<asp:requiredfieldvalidator runat="server" id="UserNameRequired" controltovalidate="UserName" validationgroup="Login1" errormessage="User Name is required." tooltip="User Name is required." >*</asp:requiredfieldvalidator>
<asp:label runat="server" id="PasswordLabel" CssClass="label" associatedcontrolid="Password">Password</asp:label>
<asp:textbox runat="server" id="Password" textmode="Password" cssclass="textbox" accesskey="p" />
<asp:requiredfieldvalidator runat="server" id="PasswordRequired" controltovalidate="Password" validationgroup="Login1" tooltip="Password is required." >*</asp:requiredfieldvalidator>
<div><asp:checkbox runat="server" id="RememberMe" text="Remember me next time"/></div>
<asp:imagebutton runat="server" id="LoginButton" CommandName="Login" AlternateText="login" skinid="login" CssClass="button"/>
or
<a href="register.aspx" class="button"><asp:image id="Image1" runat="server" AlternateText="create a new account" skinid="create"/></a>
<p><asp:literal runat="server" id="FailureText" enableviewstate="False"></asp:literal></p>
</div>
</layouttemplate>
</asp:login>
</anonymoustemplate>
<LoggedInTemplate>
<h4><asp:loginname id="LoginName1" runat="server" formatstring="Welcome {0}!" /></h4>
</LoggedInTemplate>
</asp:loginview>
<hr />
</div>
<div id="content">
<h4>Dispositivos Conectados</h4>
<asp:Button ID="refrescar" runat="server" OnClick="refrescar_Click" Text="REFRESH"/>
<asp:Button ID="Bmotor" runat="server" Text="Motor set Estado" OnClick="Bmotor_Click" />
<asp:Label ID="Lmotor" runat="server" Text=""></asp:Label>
<asp:DataGrid id="MotorsGrid"
BorderColor="Black"
BorderWidth="1px"
CellPadding="3"
OnItemCreated="Item_Created"
OnItemCommand="Motores"
AutoGenerateColumns="False"
runat="server" >
<HeaderStyle BackColor="LightGray">
</HeaderStyle>
<Columns>
<asp:BoundColumn
HeaderText="Motor Number"
DataField="Numero"/>
<asp:BoundColumn
HeaderText="Estado"
DataField="Estado"/>
<asp:BoundColumn
HeaderText="RPM"
DataField="RPM">
<ItemStyle HorizontalAlign="Right">
</ItemStyle>
</asp:BoundColumn>
<asp:ButtonColumn
HeaderText="Prender"
ButtonType="PushButton"
Text="Prender"
CommandName="Motores"/>
<asp:ButtonColumn
HeaderText="RPMs"
ButtonType="PushButton"
Text="RPMs"
CommandName="Motores"/>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Motoress"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<hr />
<hr />
</div>
</div>
<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager"
SelectMethod="GetPhotos">
</asp:ObjectDataSource>
</asp:content>
|
|
|
|
|
crazy friend wrote: Validation (Internet Explorer 6): Content is not supported outside 'script' or 'asp:content' regions.
The content tags from the masterpage need to be removed, because you are not marking content areas anymore.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i solve, but just partally, ok here is the code, i just copy all the code from default.master to de default.aspx within the first line, but i still have the default.master cause i deleted or exclude from the project a lot of error messages apper... so here is the codes.
By the way, the reason for the purpose of merging it was i need to run a javascrip timer, on the main page... so that is already running as the way it is, but, it would be wonderful if i can eliminate the default.master page from the project.
[code]
DAFULT.MASTER
<%@ Master Language="C#" CodeFile="Default.master.cs" Inherits="Default_master" %>
<!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" xml:lang="en" >
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
</form>
</body>
</html>
DAFAULT.ASPX
<%@ Page Language="C#" Title="Your Name Here | Home"
CodeFile="Default.aspx.cs" Inherits="Default_aspx" %>
<!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" xml:lang="en" >
<head id="Head1" runat="server">
<title></title>
</head>
<script type="text/javascript" language="javascript">
var secs;
var timerID = null;
var timerRunning = false;
var delay = 1000;
function InitializeTimer()
{
// Set the length of the timer, in seconds
secs = 20;
StopTheClock();
StartTheTimer();
}
function StopTheClock()
{
if(timerRunning)
clearTimeout(timerID);
timerRunning = false;
}
function StartTheTimer()
{
if (secs==0)
{
StopTheClock();
// Here's where you put something useful that's
// supposed to happen after the allotted time.
// For example, you could display a message:
//alert("You have just wasted 10 seconds of your life.");
document.getElementById("refrescar").click();
InitializeTimer();
}
else
{
self.status = secs;
secs = secs - 1;
timerRunning = true;
timerID = self.setTimeout("StartTheTimer()", delay);
}
}
function DIV1_onclick() {
}
//-->
</script>
<body onload="InitializeTimer()">
<form id="form1" runat="server">
<div class="header">
<h1>Control de Dispositivos</h1>
<h2>Melissa Contreras & Joan Miramontes</h2>
<asp:menu id="menua" runat="server"
datasourceid="SiteMapDataSource1"
cssclass="menua"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2" />
<div class="nav">
<asp:SiteMapPath id="SiteMapPath1" runat="Server" PathSeparator=" > " RenderCurrentNodeAsLink="true" />
|
<asp:LoginStatus ID="LoginStatus1" Runat="server" />
</div>
</div>
<div class="shim column" ></div>
<div class="page" id="home">
<div id="sidebar">
<asp:loginview id="LoginArea" runat="server">
<AnonymousTemplate>
<asp:login id="Login1" runat="server">
<layouttemplate>
<div class="login">
<h4>Login to Site</h4>
<asp:label runat="server" id="UserNameLabel" CssClass="label" associatedcontrolid="UserName">User Name</asp:label>
<asp:textbox runat="server" id="UserName" cssclass="textbox" accesskey="u" />
<asp:requiredfieldvalidator runat="server" id="UserNameRequired" controltovalidate="UserName" validationgroup="Login1" errormessage="User Name is required." tooltip="User Name is required." >*</asp:requiredfieldvalidator>
<asp:label runat="server" id="PasswordLabel" CssClass="label" associatedcontrolid="Password">Password</asp:label>
<asp:textbox runat="server" id="Password" textmode="Password" cssclass="textbox" accesskey="p" />
<asp:requiredfieldvalidator runat="server" id="PasswordRequired" controltovalidate="Password" validationgroup="Login1" tooltip="Password is required." >*</asp:requiredfieldvalidator>
<div><asp:checkbox runat="server" id="RememberMe" text="Remember me next time"/></div>
<asp:imagebutton runat="server" id="LoginButton" CommandName="Login" AlternateText="login" skinid="login" CssClass="button"/>
or
<a href="register.aspx" class="button"><asp:image id="Image1" runat="server" AlternateText="create a new account" skinid="create"/></a>
<p><asp:literal runat="server" id="FailureText" enableviewstate="False"></asp:literal></p>
</div>
</layouttemplate>
</asp:login>
</anonymoustemplate>
<LoggedInTemplate>
<h4><asp:loginname id="LoginName1" runat="server" formatstring="Welcome {0}!" /></h4>
</LoggedInTemplate>
</asp:loginview>
<hr />
</div>
<div id="content">
<h4>Dispositivos Conectados</h4>
<asp:Button ID="refrescar" runat="server" OnClick="refrescar_Click" Text="REFRESH"/>
<asp:Button ID="Bmotor" runat="server" Text="Motor set Estado" OnClick="Bmotor_Click" />
<asp:Label ID="Lmotor" runat="server" Text=""></asp:Label>
<asp:DataGrid id="MotorsGrid"
BorderColor="Black"
BorderWidth="1px"
CellPadding="3"
OnItemCreated="Item_Created"
OnItemCommand="Motores"
AutoGenerateColumns="False"
runat="server" >
<HeaderStyle BackColor="LightGray">
</HeaderStyle>
<Columns>
<asp:BoundColumn
HeaderText="Motor Number"
DataField="Numero"/>
<asp:BoundColumn
HeaderText="Estado"
DataField="Estado"/>
<asp:BoundColumn
HeaderText="RPM"
DataField="RPM">
<ItemStyle HorizontalAlign="Right">
</ItemStyle>
</asp:BoundColumn>
<asp:ButtonColumn
HeaderText="Prender"
ButtonType="PushButton"
Text="Prender"
CommandName="Motores"/>
<asp:ButtonColumn
HeaderText="RPMs"
ButtonType="PushButton"
Text="RPMs"
CommandName="Motores"/>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Motoress"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<hr />
<hr />
</div>
</div>
<asp:ObjectDataSource ID="ObjectDataSource1" Runat="server" TypeName="PhotoManager"
SelectMethod="GetPhotos">
</asp:ObjectDataSource>
<div class="footerbg">
<div class="footer">
<asp:menu id="menub" runat="server"
datasourceid="SiteMapDataSource1"
cssclass="menub"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2" />
Copyright © 2007 MCJM Co.
</div>
</div>
<asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" />
</form>
</body>
</html>
[/code]
|
|
|
|
|
Where can I find out about adding foriegn keys?
|
|
|
|
|
google ? The SQL forum ? A book ? Hard to say anything more specific, I can't work out if you have a reason for posting in the ASP.NET forum that you've not made clear.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Does anyone know how to display the thumbnail image of a crystal report
instead of the actual report on a webpage.
I want to display the thumbnail on the page and let the user click the image to diplay the actual report in the Crystal Report Viewer.
Suggestions???
|
|
|
|
|
I have a small online store page that uses a grid view to display the item image and description. I would like my customers to be able to click on the image that is displayed in the gridview to view a larger image. Is this possible?
i.e. Click on image to view larger image.
I am using an xml file that houses the image url and description of the items.
Framework 2.0
|
|
|
|
|
Just set up your template for that column to render the image as a link to a window that shows a bigger image target="_blank" as part of the link will cause it to open in a new window
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks for the tip. Unfortunatly and I am new to all this and dont know exactly how to accomplish that. Any suggestions?
|
|
|
|
|
Hi....
I an having problem ...
I have to create one report in VS 2005.
I had created one dataset which will return one table....
this table containt & fields, as follows
MovieName, ShowTime, ScreenNo, TicketClass, ClassPrice, TotalSaleTicketforClass, TotalAmt
Here there are two classes Silver, Gold.....
Now the problem is I have to create group for TicketClass. also for one movie, there are four ShowTime, and each show has 2 Screen.....
so how to make Groups such that I can view list of movie by TicketClass...
|
|
|
|
|
I assume that you are using .NET crystal report to generate this report. Do the grouping in the Crystal Report in the below given order and Format it accordingly. so, that you can view the list of movies by TicketClass, by ShowTime, by ScreenNo.
1. Group By TicketClass<br />
2. Group By ShowTime<br />
3. Group By ScreenNo
Regards - J O N -
|
|
|
|
|
Hi.
For using Ajax in our web sites, the host that my web is used must have Ajax support or not, no special support is needed except for JavaScript?
Best wishes
|
|
|
|
|
If you'll use MS AJAX 1.0 library you should check if it's installed on the hosting server (in the GAC).
other libraries can be used just by copying to the bin folder, like anthem[^]
JavaScript is required to be enabled on client PCs not the server.
|
|
|
|
|
That's correct, there is no special support needed if you're just usng AJAX, not using a third party AJAX library.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I need to access the members (controls,properties,methods) in the Parent Page from the User Control which is contained in it.
For the controls I tried looping through the controls in the Parent Page but I am not able to find the textboxes as they are rendered as a literal control.
Also how do I access the properties and methods of the Parent Page from the User Control. Please help me out.
Thanks in advance,
Aakar.
|
|
|
|
|
This does not seem like a good design for your application.
What does this control do and why should it see all page members?
Can you just cast the Page property of the control to the container page type (if this control is always used in the same page).
|
|
|
|
|
you can access parent control but this is not proper way instead you can create properties in user control those required
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hello frnds,
how can i use code behind variable in VBScript
it is possible ?
please give an example
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
You can put the value in a hidden field so it's readable and writable from both server (code behind) and client (VBScript) code.
If you want to just read the variable from VBScript using server tags:
msgbox "<%=variableName%>"
don't forget to make the variable protected or public.
|
|
|
|
|
hello frnds,
i have a arraylist which contain some value i want to use that arraylist on another ASPX page but i don't want to use "session" as it is cached and use system memeory.
Is there any another option that i can use.. but it should be non-chached ..
thankx..a LOT in advance
please help...
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: i don't want to use "session" as it is cached and use system memeory.
Session variables are not cached. The are just put in the Items collection of the Session object.
If you want to retain the ArrayList it will use memory, regardless if you put it in a session variable or not.
---
single minded; short sighted; long gone;
|
|
|
|
|
Means i used lot of time my session variable...it not arrise any problem?
does the session variable limit exceed ...
is it safe to use session variable and put all the values in it and transefer it to another page
thankx for u r fast reply
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: Means i used lot of time my session variable...it not arrise any problem?
Not any bigger problems than any alternative.
koolprasad2003 wrote: does the session variable limit exceed ...
They are only limited by available memory. Although there is plenty of memory, it's still a limited resource, so you should be careful not to place large objects in session variables.
koolprasad2003 wrote: is it safe to use session variable and put all the values in it and transefer it to another page
Safe from what?
---
single minded; short sighted; long gone;
|
|
|
|
|
Yes, you can use a cross page postback, if the site goes from the first page to the second. Or you can make both pages controls and put them both on the same page, so that viewstate will just work between them. Or you can put your values on the URL and pass them that way
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|