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

ASP.NET

 
QuestionDreamweaver problems Pin
matjame15-May-07 22:25
matjame15-May-07 22:25 
AnswerRe: Dreamweaver problems Pin
N a v a n e e t h15-May-07 22:50
N a v a n e e t h15-May-07 22:50 
QuestionHow to give keywords in a query in .NET Pin
micydon15-May-07 21:58
micydon15-May-07 21:58 
AnswerRe: How to give keywords in a query in .NET Pin
N a v a n e e t h15-May-07 22:48
N a v a n e e t h15-May-07 22:48 
GeneralRe: How to give keywords in a query in .NET Pin
micydon16-May-07 23:05
micydon16-May-07 23:05 
QuestionIE 6 Freeze for 15 sec (ASP.NET application) Pin
jeaa15-May-07 21:44
jeaa15-May-07 21:44 
AnswerRe: IE 6 Freeze for 15 sec (ASP.NET application) Pin
N a v a n e e t h15-May-07 22:36
N a v a n e e t h15-May-07 22:36 
GeneralRe: IE 6 Freeze for 15 sec (ASP.NET application) Pin
jeaa15-May-07 23:41
jeaa15-May-07 23:41 
I will try to explain how the web application works. It includes a Master page with a tree-view control located left, and a contentPlaceHolder in the right position. The first asp page in the contentPlaceHolder holds a gridview control. The gridview control has links on each row that leads to an asp page that holds an asp menu like this:

<table>
<tr>
<td>
<asp:Menu
id="Menu1"
Orientation="Horizontal"
StaticMenuItemStyle-CssClass="tab"
StaticSelectedStyle-CssClass="selectedTab"
CssClass="tabs"
OnMenuItemClick="Menu1_MenuItemClick"
Runat="server">
<Items>
<asp:MenuItem Text="Generelt" Value="0"/>
<asp:MenuItem Text="Pris" Value="1" />
<asp:MenuItem Text="Biler" Value="2" />
<asp:MenuItem Text="Avtale" Value="3" />
<asp:MenuItem Text="Utbetal oppdrag" Value="4" />
<asp:MenuItem Text="Rapporter" Value="5" />
</Items>
<StaticMenuItemStyle CssClass="tab" />
<StaticSelectedStyle CssClass="selectedTab" />
</asp:Menu>
<div class="tabContents">
<asp:MultiView
id="MultiView1"
ActiveViewIndex="0"
Runat="server">
<asp:View ID="ViewDetails" runat="server">
<table cellpadding="0" cellspacing="0" border="1">
<tr id="rowDetails" style="display:none;">
<td id="rowCellDetails" >
</td>
</tr>
</table>
</asp:View>
<asp:View ID="ViewPrice" runat="server">
<table cellpadding="0" cellspacing="0" border="1" >
<tr id="rowPrice" style="display:none;">
<td id="rowCellPrice" >
</td>
</tr>
</table>
</asp:View>
<asp:View ID="ViewCars" runat="server">
<table cellpadding="0" cellspacing="0" border="1">
<tr id="rowCars" style="display:none;">
<td id="rowCellCars" >
</td>
</tr>
</table>
</asp:View>
<asp:View ID="ViewAgreement" runat="server">
<table cellpadding="0" cellspacing="0" border="1">
<tr id="rowAgreement" style="display:none;">
<td id="rowCellAgreement" >
</td>
</tr>
</table>
</asp:View>
<asp:View ID="ViewAssignment" runat="server">
<table cellpadding="0" cellspacing="0" border="1">
<tr id="rowAssignment" style="display:none;">
<td id="rowCellAssignment" >
</td>
</tr>
</table>
</asp:View>
<asp:View ID="ViewReports" runat="server">
<table cellpadding="0" cellspacing="0" border="1">
<tr id="rowReports" style="display:none; width:500">
<td id="rowCellReports">
</td>
</tr>
</table>
</asp:View>
</asp:MultiView>
</div>
</td>
</tr>
</table>


The codebehind activate what view to point out. Like this:


protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
{
int index = Int32.Parse(e.Item.Value);
MultiView1.ActiveViewIndex = index;
if (index == 0)
{
String Url = String.Format("stationdetails.aspx?id={0}", id);
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowDetails').style.display=''; " +
" document.getElementById('rowCellDetails').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 style=\"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");
}
if (index == 1)
{
String Url = String.Format("editPrice.aspx?id={0}", id);
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowPrice').style.display=''; " +
" document.getElementById('rowCellPrice').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 style=\"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");
}
if (index == 2)
{
String Url = String.Format("cars.aspx?id={0}", id);
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowCars').style.display=''; " +
" document.getElementById('rowCellCars').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 style=\"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");
}
if (index == 3)
{
String Url = String.Format("agreement.aspx?id={0}", id);
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowAgreement').style.display=''; " +
" document.getElementById('rowCellAgreement').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 \"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");

}
if (index == 4)
{
String Url = String.Format("assignment.aspx");
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowAssignment').style.display=''; " +
" document.getElementById('rowCellAssignment').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 style=\"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");
}
if (index == 5)
{
String Url = String.Format("chooseReport.aspx");
ClientScript.RegisterStartupScript(GetType(), "", "<script language=JavaScript> " +
" document.getElementById('rowReports').style.display=''; " +
" document.getElementById('rowCellReports').innerHTML='<iframe src=\"" + Url + "\" height=460 width=700 frameborder=0 style=\"border:1px #d4d0c8 solid;\"></iframe>'" +
"</script> ");
}}

QuestionInstalling ASP.Net 2.0 onto web server, App_Data, SQL2005 problem Pin
RodEffect15-May-07 21:26
RodEffect15-May-07 21:26 
Questionurgent Pin
deepaksringr15-May-07 21:03
deepaksringr15-May-07 21:03 
AnswerRe: urgent Pin
Sathesh Sakthivel15-May-07 21:14
Sathesh Sakthivel15-May-07 21:14 
AnswerRe: urgent Pin
meeram39515-May-07 22:49
meeram39515-May-07 22:49 
AnswerFOUR urgent posts in one day Pin
leckey16-May-07 3:25
leckey16-May-07 3:25 
Questionproblem in creating active x in .net Pin
nikhilrawat2315-May-07 20:56
nikhilrawat2315-May-07 20:56 
Questionhow we create tree view? Pin
deepaksringr15-May-07 20:56
deepaksringr15-May-07 20:56 
AnswerRe: how we create tree view? Pin
Sathesh Sakthivel15-May-07 21:18
Sathesh Sakthivel15-May-07 21:18 
QuestionModal Dialog and Session Problem Pin
RaviJJain15-May-07 20:53
RaviJJain15-May-07 20:53 
QuestionASP.NET with VB in Connecting Database Pin
JosephWONG15-May-07 20:50
JosephWONG15-May-07 20:50 
AnswerRe: ASP.NET with VB in Connecting Database Pin
Sathesh Sakthivel15-May-07 21:08
Sathesh Sakthivel15-May-07 21:08 
GeneralRe: ASP.NET with VB in Connecting Database Pin
JosephWONG15-May-07 21:51
JosephWONG15-May-07 21:51 
QuestionFreezing Header of GridView Pin
248912815-May-07 20:48
248912815-May-07 20:48 
QuestionUrgent Pin
jamesmani2k515-May-07 20:47
jamesmani2k515-May-07 20:47 
AnswerRe: Urgent Pin
Sathesh Sakthivel15-May-07 21:06
Sathesh Sakthivel15-May-07 21:06 
AnswerRe: Urgent Pin
Guffa15-May-07 22:05
Guffa15-May-07 22:05 
Questionvery urgent Pin
deepaksringr15-May-07 20:13
deepaksringr15-May-07 20:13 

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.