Hej. Försvinner HTML-koden för menyn också, eller finns den kvar men den inte visas ändå? Om den genererade html:en finns kvar, hur ser html-koden för sidan ut i sådana fall? Html koden för menyn finns kvar men den visas inte. Ett utdrag från htmlkoden för menyn:Menyn försvinner när CrystalReportViewer binds
Har en huvudsida (index.aspx) som innehåller en tabell med tre celler. I top cellen finns en logga, i left cellen en placeholder som hållen en web user control (menu.ascx) och i main cellen en placeholder som håller en web user control (crystalreport.ascx). Allt enligt nedan:
-------------------------------------------------------------------------
loggan här
-------------------------------------------------------------------------
|
menyn här | CrystalReportViewern här
(menu.ascx) | (crystalreport.ascx)
|
|
|
|
Problemet då.. När ett fyllt dataset binds till CrystalReportViewern (görs i crystalreport.ascx) så försvinner menyn (syns inte på sidan). Om jag kommenterar bort subben där den binds mot datasettet så syns menyn. Loggan syns dock alltid. Hur löser jag detta och varför blir det så här?Sv: Menyn försvinner när CrystalReportViewer binds
/JohanSv:Menyn försvinner när CrystalReportViewer binds
<code>
<HTML>
<HEAD>
<title>index</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="index.aspx" id="Form1">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="dDwxNzM5NjUyODk1O3Q8O2w8aTwxPjs+O2w8dDw7bDxpPDU+Oz47bDx0PDtsPGk8MD47Pjts
PHQ8O2w8aTwxPjtpPDM+O2k8NT47aTw3PjtpPDk+O2k8MTI+Oz47bDx0PHQ8O3A8bDxpPDA+O2k8MT47aTwyPjtpPDM+O2k8ND47aTw1PjtpPDY+
O2k8Nz47aTw4PjtpPDk+O2k8MTA+O2k8MTE+O2k8MTI+O2k8MTM+O2k8MTQ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E6X2N0bDA6X2N0bDI7X2N0bDE6Q3J5c3RhbFJlcG9ydFZpZXdlcjE6X2N0bDE6X2N0bDA6X2N0bDM7X2N
0bDE6Q3J5c3RhbFJlcG9ydFZpZXdlcjE6X2N0bDE6X2N0bDA6X2N0bDU7X2N0bDE6Q3J5c3RhbFJlcG9ydFZpZXdlcjE6X2N0bDE6X2N0bDA6X2N0bDc7X
2N0bDE6Q3J5c3RhbFJlcG9ydFZpZXdlcjE6X2N0bDE6X2N0bDA6X2N0bDg7X2N0bDE6Q3J5c3RhbFJlcG9ydFZpZXdlcjE6X2N0bDE6X2N0bDA6X2N0bDk
7Pj5r5lgZA0qBFil/4ODODc9H/YP3Og==" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform;
if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
theform = document.forms["Form1"];
}
else {
theform = document.Form1;
}
theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; WIDTH: 1000px; POSITION: absolute; TOP: 8px; HEIGHT: 1011px"
height="1011" cellSpacing="0" cellPadding="0" width="1000" border="0">
<TR>
<TD style="HEIGHT: 70px" colSpan="3" height="65">
<img id="Image1" src="images/max_logo.gif" border="0" /></TD>
</TR>
<TR>
<TD style="OVERFLOW: auto; WIDTH: 159px" vAlign="top" rowSpan="2">
<TABLE id="Table1" style="WIDTH: 208px; HEIGHT: 310px" cellSpacing="1" cellPadding="1"
width="208" border="0">
<TR>
<TD style="WIDTH: 10px" width="10" height="40"></TD>
<TD><div id="_ctl0_divSlideMenu" style="width:192px;">
<!-- menu -->
<style type="text/css
'Här är massa css saker som sköter menyns utseende m.m
</script>
<!-- menu -->
</div></TD>
<TD height="40"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px" height="20"></TD>
<TD height="20"></TD>
<TD height="20"></TD>
</TR>
<TR>
<TD style="WIDTH: 10px"></TD>
<TD vAlign="top">
<P><BR>
</P>
</TD>
<TD></TD>
</TR>
</TABLE>
</TD>
'lite annan kod egentligen här (bla lite textboxar och dropdowns)
'Här är Viewern
<DIV style="WIDTH: 840px; POSITION: relative; HEIGHT: 72px" ms_positioning="GridLayout">
<P>
<table id="_ctl1_CrystalReportViewer1" style="height:50px;width:350px;Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px">
<tr><td>
<div style="width: 350px; height: 50px;position:relative">
<script>
ie4up=false;
var agt = navigator.userAgent.toLowerCase();
var major = parseInt(navigator.appVersion);
if ((agt.indexOf('msie') != -1) && (major >= 4))
ie4up = true;
</script>
<script language="javascript">
<!--
function doGraphDrilldown__ctl1_CrystalReportViewer1__ctl1(event, brch, offsetX, offsetY, pageNumber) {
if (ie4up)
javascript:__doPostBack('_ctl1$CrystalReportViewer1$_ctl1','brch=' + brch + '&coord=' + (event.offsetX*15 / 1
+parseInt(offsetX)) + '-' + (event.offsetY*15 / 1 +parseInt(offsetY)) +
'&pagenumber=' + pageNumber )
else
javascript:__doPostBack('_ctl1$CrystalReportViewer1$_ctl1','brch=' + brch + '&coord=' + (event.layerX*15 / 1
+parseInt(offsetX)) + '-' + (event.layerY*15 / 1 +parseInt(offsetY)) +
'&pagenumber=' + pageNumber )
}
// -->
</script>
'Efter detta lite kod för viewerns utseende
</code>
Kan det ha något med viewstaten att göra?