HyperLink in ASP.NET 2.0 Web Page

A

ABHIJIT B

Hi,

I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.

The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.

The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.

------------------------------------------------------------
Normal html code :

body>

<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>

</body>
</html>
<script language="javascript" type="text/javascript">

function OpenIt()
{
alert("Hi");

window.event.returnValue=false;

//var returnVal = '';

//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);

return true;
}

</script>

------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I replaced
double qutoes with single quote it is giving syntax error..Kindly help
me out.

ASPX.cs code :

if (dtServiceStatusInfo.Rows.Count > 0)
{

Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");

foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");

}

Response.Write("</table>");
dcDCHSucess = true;
}
 
C

Coskun SUNALI [MVP]

Hi,

I can't say that using Response.Write to create your controls structure is
the best way to do that.

I would rather suggest you using the Controls collection of the Page and add
your child controls inside it or creating a container control - Panel for
example - and add your child controls to the Controls collection of that
Panel.

The solution for your problem is below:

Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,null,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");


--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

ABHIJIT B said:
Hi,

I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.

The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.

The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.

------------------------------------------------------------
Normal html code :

body>

<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>

</body>
</html>
<script language="javascript" type="text/javascript">

function OpenIt()
{
alert("Hi");

window.event.returnValue=false;

//var returnVal = '';

//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);

return true;
}

</script>

------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I replaced
double qutoes with single quote it is giving syntax error..Kindly help
me out.

ASPX.cs code :

if (dtServiceStatusInfo.Rows.Count > 0)
{

Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");

foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");

}

Response.Write("</table>");
dcDCHSucess = true;
}
 
A

ABHIJIT B

Thanks Coskun for your reply.

I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,

strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";

I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'

I tried to use Request.Params[] and bind value to hidden control

<input id="hidName" runat="server" type="hidden" />

It is displaying error.

So I use this code in Popup form

string strq = (string)Request.QueryString["Param1"];

strq value is null.

Kindly assist me for same.



Hi,

I can't say that using Response.Write to create your controls structure is
the best way to do that.

I would rather suggest you using the Controls collection of the Page and add
your child controls inside it or creating a container control - Panel for
example - and add your child controls to the Controls collection of that
Panel.

The solution for your problem is below:

Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk




I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :

<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
   function OpenIt()
   {
       alert("Hi");
       window.event.returnValue=false;
       //var returnVal = '';
       //returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
       var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
       return true;
   }
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
               {
                   Response.Write("<table border='1'>");
                   Response.Write("<tr>");
                   Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
                   Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
                   Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
                   Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
                   Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
                   Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
                   Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
                   Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
                   Response.Write("</tr>");
                   Response.Write("<tr>");
                   Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
                   Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
                   Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
                   Response.Write("</tr>");
                   foreach (DataRow record in
dtServiceStatusInfo.Rows)
                   {
                       Response.Write("<tr>");
                       Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
                       //Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString()     + "</a></td>");
                       //Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
                       //Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString()     + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString()    + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString()           + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString()  + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString()    + "</a></td>");
                       Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString()      + "</a></td>");
                       Response.Write("</tr>");
                   }
                   Response.Write("</table>");
dcDCHSucess = true;
               }- Hide quoted text -

- Show quoted text -
 
C

Coskun SUNALI [MVP]

Hi,

You request to access Param1 value using the code you mentioned. Though a
conversion to "string" is not required since Request.QueryString is basicly
a string array. I have no idea why it doesn't work.

I see a ".htm" extention in the popup URL, are you sure this function opens
a window with a location of your Aspx page?

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

Thanks Coskun for your reply.

I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,

strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";

I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'

I tried to use Request.Params[] and bind value to hidden control

<input id="hidName" runat="server" type="hidden" />

It is displaying error.

So I use this code in Popup form

string strq = (string)Request.QueryString["Param1"];

strq value is null.

Kindly assist me for same.



Hi,

I can't say that using Response.Write to create your controls structure is
the best way to do that.

I would rather suggest you using the Controls collection of the Page and
add
your child controls inside it or creating a container control - Panel for
example - and add your child controls to the Controls collection of that
Panel.

The solution for your problem is below:

Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk




I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :

<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
function OpenIt()
{
alert("Hi");

//var returnVal = '';
//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
return true;
}
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
{
Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");
foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");

Response.Write("</table>");
dcDCHSucess = true;
}- Hide quoted text -

- Show quoted text -
 
A

ABHIJIT B

Hi Coskun,

Yes it is opening page.
I tried different way instead of using .htm I used .aspx page and it
worked out for me.

Thanks & Take care.


Hi,

You request to access Param1 value using the code you mentioned. Though a
conversion to "string" is not required since Request.QueryString is basicly
a string array. I have no idea why it doesn't work.

I see a ".htm" extention in the popup URL, are you sure this function opens
a window with a location of your Aspx page?

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk


Thanks Coskun for your reply.

I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,

strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";

I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'

I tried to use Request.Params[] and bind value to hidden control

<input id="hidName" runat="server" type="hidden" />

It is displaying error.

So I use this code  in Popup form

string strq = (string)Request.QueryString["Param1"];

strq value is null.

Kindly assist me for same.

I can't say that using Response.Write to create your controls structure is
the best way to do that.
I would rather suggest you using the Controls collection of the Page and
add
your child controls inside it or creating a container control - Panel for
example - and add your child controls to the Controls collection of that
Panel.
The solution for your problem is below:
Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");
news:e1843d5f-0df5-4c4d-8e8c-bc1f9ed2ddd6@s13g2000prd.googlegroups.com...
Hi,
I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :
body>
<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
function OpenIt()
{
alert("Hi");
window.event.returnValue=false;
//var returnVal = '';
//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
return true;
}
</script>
------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I replaced
double qutoes with single quote it is giving syntax error..Kindly help
me out.
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
{
Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");
foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");
}
Response.Write("</table>");
dcDCHSucess = true;
}- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
C

Coskun SUNALI [MVP]

Hi,

Just to remind; as long as you don't register "htm" extention to be served
using ASP.NET ISAPI in your IIS configuration, you can not execute any
ASP.NET code inside it.

Glad that it worked for you.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

Hi Coskun,

Yes it is opening page.
I tried different way instead of using .htm I used .aspx page and it
worked out for me.

Thanks & Take care.


Hi,

You request to access Param1 value using the code you mentioned. Though a
conversion to "string" is not required since Request.QueryString is
basicly
a string array. I have no idea why it doesn't work.

I see a ".htm" extention in the popup URL, are you sure this function
opens
a window with a location of your Aspx page?

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk


Thanks Coskun for your reply.

I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,

strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";

I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'

I tried to use Request.Params[] and bind value to hidden control

<input id="hidName" runat="server" type="hidden" />

It is displaying error.

So I use this code in Popup form

string strq = (string)Request.QueryString["Param1"];

strq value is null.

Kindly assist me for same.

I can't say that using Response.Write to create your controls structure
is
the best way to do that.
I would rather suggest you using the Controls collection of the Page and
add
your child controls inside it or creating a container control - Panel
for
example - and add your child controls to the Controls collection of that
Panel.
The solution for your problem is below:
Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");
news:e1843d5f-0df5-4c4d-8e8c-bc1f9ed2ddd6@s13g2000prd.googlegroups.com...
Hi,
I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :
body>
<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
function OpenIt()
{
alert("Hi");
window.event.returnValue=false;
//var returnVal = '';
//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
return true;
}
</script>
------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I replaced
double qutoes with single quote it is giving syntax error..Kindly help
me out.
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
{
Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");
foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");
}
Response.Write("</table>");
dcDCHSucess = true;
}- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
A

ABHIJIT B

Hi Coskun,

Thanks for updating my knowledge.

I want to use CSS in following table.I am new to ASP.NET 2.0 Literal
Control concept.
Kindly help me out for same.

CS file code:

if (dtServiceStatusInfo.Rows.Count > 0)
{
//Literal Control

strTable = "<table border='1'><tr>";
strTable = strTable + "<td rowspan='2'
style='width: 175px' align='center'> SERVICE </td>";
strTable = strTable + "<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>";
strTable = strTable + "<td rowspan='2'
align='center'> PROCESSED </td>";
strTable = strTable + "<td rowspan='2'
align='center'> DATACHECKER <br /> RUN </td>";
strTable = strTable + "<td rowspan='2'
align='center'> NOT <br /> OPEN </td>";
strTable = strTable + "<td rowspan='2'
align='center'> IN <br /> PROGRESS </td>";
strTable = strTable + "<td rowspan='2'
align='center'> SUB. FOR <br /> RELEASE </td>";
strTable = strTable + "<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>";
strTable = strTable + "</tr>";
strTable = strTable + "<tr>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> IN CRS <br /> & NOT IN PRODN. </
td>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </
td>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> IN CRS <br /> & IN PRODN. </td>";
strTable = strTable + "</tr>";

foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
ServiceDesc = "";
ServiceDesc =
record["ServiceDesc"].ToString();

strTable = strTable + "<tr>";
strTable = strTable + "<td rowspan='1'
style='width: 175px' align='center'><a href='DatabaseControl.aspx?
ServiceDesc=" + ServiceDesc + "'>" + record["ServiceDesc"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true;\">" + record["NoOfDBinPDN"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["NoOfDBinBoth"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["NoOfDBProcessed"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["DCRun"].ToString() + "</
a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["NotOpenedDBCnt"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["InProgressDBCnt"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["ReleaseDBCnt"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["ReRunDBCnt"].ToString() +
"</a></td>";
strTable = strTable + "</tr>";
}

strTable = strTable + "</table>";

LiteralDCHome.Text = strTable;
}


Best Regards,
Abhijit B

Hi,

Just to remind; as long as you don't register "htm" extention to be served
using ASP.NET ISAPI in your IIS configuration, you can not execute any
ASP.NET code inside it.

Glad that it worked for you.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk


Hi Coskun,

Yes it is opening page.
I tried different way instead of using .htm I used .aspx page and it
worked out for me.

Thanks & Take care.

You request to access Param1 value using the code you mentioned. Though a
conversion to "string" is not required since Request.QueryString is
basicly
a string array. I have no idea why it doesn't work.
I see a ".htm" extention in the popup URL, are you sure this function
opens
a window with a location of your Aspx page?
"ABHIJITB" <[email protected]> wrote in message
Thanks Coskun for your reply.
I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,
strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";
I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'
I tried to use Request.Params[] and bind value to hidden control
<input id="hidName" runat="server" type="hidden" />
It is displaying error.
So I use this code in Popup form
string strq = (string)Request.QueryString["Param1"];
strq value is null.
Kindly assist me for same.
Hi,
I can't say that using Response.Write to create your controls structure
is
the best way to do that.
I would rather suggest you using the Controls collection of the Page and
add
your child controls inside it or creating a container control - Panel
for
example - and add your child controls to the Controls collection of that
Panel.
The solution for your problem is below:
Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­­­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");
--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk

Hi,
I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :
body>
<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
function OpenIt()
{
alert("Hi");
window.event.returnValue=false;
//var returnVal = '';
//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­­­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
return true;
}
</script>
------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I replaced
double qutoes with single quote it is giving syntax error..Kindly help
me out.
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
{
Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");
foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");
}
Response.Write("</table>");
dcDCHSucess = true;
}- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 
C

Coskun SUNALI [MVP]

Hi,

I will suggest you to read about Table, TableRow, TableCell and how to
create a HTML Table on the fly, programmatically.

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.table.aspx

http://technet.microsoft.com/en-us/library/system.web.ui.webcontrols.tablerow.aspx

http://technet.microsoft.com/en-us/library/system.web.ui.webcontrols.tablecell.aspx

http://msdn2.microsoft.com/en-us/library/7bewx260(VS.80).aspx

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

Hi Coskun,

Thanks for updating my knowledge.

I want to use CSS in following table.I am new to ASP.NET 2.0 Literal
Control concept.
Kindly help me out for same.

CS file code:

if (dtServiceStatusInfo.Rows.Count > 0)
{
//Literal Control

strTable = "<table border='1'><tr>";
strTable = strTable + "<td rowspan='2'
style='width: 175px' align='center'> SERVICE </td>";
strTable = strTable + "<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>";
strTable = strTable + "<td rowspan='2'
align='center'> PROCESSED </td>";
strTable = strTable + "<td rowspan='2'
align='center'> DATACHECKER <br /> RUN </td>";
strTable = strTable + "<td rowspan='2'
align='center'> NOT <br /> OPEN </td>";
strTable = strTable + "<td rowspan='2'
align='center'> IN <br /> PROGRESS </td>";
strTable = strTable + "<td rowspan='2'
align='center'> SUB. FOR <br /> RELEASE </td>";
strTable = strTable + "<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>";
strTable = strTable + "</tr>";
strTable = strTable + "<tr>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> IN CRS <br /> & NOT IN PRODN. </
td>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </
td>";
strTable = strTable + "<td rowspan='1'
style='width: 75px' align='center'> IN CRS <br /> & IN PRODN. </td>";
strTable = strTable + "</tr>";

foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
ServiceDesc = "";
ServiceDesc =
record["ServiceDesc"].ToString();

strTable = strTable + "<tr>";
strTable = strTable + "<td rowspan='1'
style='width: 175px' align='center'><a href='DatabaseControl.aspx?
ServiceDesc=" + ServiceDesc + "'>" + record["ServiceDesc"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true;\">" + record["NoOfDBinPDN"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["NoOfDBinBoth"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["NoOfDBProcessed"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["DCRun"].ToString() + "</
a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["NotOpenedDBCnt"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" +
record["InProgressDBCnt"].ToString() + "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["ReleaseDBCnt"].ToString()
+ "</a></td>";
strTable = strTable + "<td rowspan='1'
align='center'><a href=\"#\" onclick=
\"dchwindow=window.open('DataCheckerStatusReport.aspx?ServiceDesc=" +
ServiceDesc + "',760,500,null,null,'dchwindow',
5,true,true,true);return true\">" + record["ReRunDBCnt"].ToString() +
"</a></td>";
strTable = strTable + "</tr>";
}

strTable = strTable + "</table>";

LiteralDCHome.Text = strTable;
}


Best Regards,
Abhijit B

Hi,

Just to remind; as long as you don't register "htm" extention to be served
using ASP.NET ISAPI in your IIS configuration, you can not execute any
ASP.NET code inside it.

Glad that it worked for you.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk


Hi Coskun,

Yes it is opening page.
I tried different way instead of using .htm I used .aspx page and it
worked out for me.

Thanks & Take care.

You request to access Param1 value using the code you mentioned. Though
a
conversion to "string" is not required since Request.QueryString is
basicly
a string array. I have no idea why it doesn't work.
I see a ".htm" extention in the popup URL, are you sure this function
opens
a window with a location of your Aspx page?
"ABHIJITB" <[email protected]> wrote in message
Thanks Coskun for your reply.
I did certain changes now I am appending create table string to
Literal Control.
Now I am small issue.I am using following code,
strTable = strTable + "<td rowspan=\"1\" align=\"center\"><a href=\"#
\" onclick=\"mywin001=window.open('DataCheckerStatusReport.htm?
Param1=Test1&Param2=Test2',825,500,null,null,'mywin001',
5,true,true,true);return true;\">" + record["NoOfDBinCRS"].ToString()
+ "</a></td>";
I want to access querystring Paaram1 value in Popup form
'DataCheckerStatusReport.htm'
I tried to use Request.Params[] and bind value to hidden control
<input id="hidName" runat="server" type="hidden" />
It is displaying error.
So I use this code in Popup form
string strq = (string)Request.QueryString["Param1"];
strq value is null.
Kindly assist me for same.
Hi,
I can't say that using Response.Write to create your controls
structure
is
the best way to do that.
I would rather suggest you using the Controls collection of the Page
and
add
your child controls inside it or creating a container control - Panel
for
example - and add your child controls to the Controls collection of
that
Panel.
The solution for your problem is below:
Response.Write("<td rowspan=\"1\" align=\"center\"><a href=\"#\"
onclick=\"mywin001=window.open('DataCheckerStatusReport.htm',700,450,null,n­­­ull,'mywin001',5,true,true,true);return
false\">" + record ["NoOfDBinCRS"].ToString() + "</a></td>");
--
All the best,
Coskun SUNALI
MVP ASP/ASP.NEThttp://sunali.comhttp://www.propeople.dk

Hi,
I am developing one WebPage which has table stucture for which I
acnnot us HtmlTable class,GridView,DataGrid etc. for display.
The following is script inwhich I am using Response.Write() for
generating Table.
This script I am assigning to Literal Control in next step.
The problem I am facing is I want to open .htm page as PopuP either
by
using window.open or showmodal dialog.
------------------------------------------------------------
Normal html code :
body>
<a href="#"
onclick="mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return
false">Slide1</
a>
<br />
<a href="#" onclick="mywin001=OpenIt()">Slide2</a>
</body>
</html>
<script language="javascript" type="text/javascript">
function OpenIt()
{
alert("Hi");
window.event.returnValue=false;
//var returnVal = '';
//returnVal =
window.showModalDialog('SearchUsers.htm','','center:yes;scroll:no;resizable­­­:no;dialogWidth:
750px;dialogHeight:425px;dialogHide:true;status:no;help:no');
var mywin001 = window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);
return true;
}
</script>
------------------------------------------------------------
I want tto use <a href='#' functionality in Response.Write I
replaced
double qutoes with single quote it is giving syntax error..Kindly
help
me out.
ASPX.cs code :
if (dtServiceStatusInfo.Rows.Count > 0)
{
Response.Write("<table border='1'>");
Response.Write("<tr>");
Response.Write("<td rowspan='2' style='width:
175px' align='center'> SERVICE </td>");
Response.Write("<td rowspan='1' colspan='3'
style='width: 225px' align='center'> EXPECTED </td>");
Response.Write("<td rowspan='2' align='center'>
PROCESSED </td>");
Response.Write("<td rowspan='2' align='center'>
DATACHECKER <br /> RUN </td>");
Response.Write("<td rowspan='2' align='center'>
NOT <br /> OPEN </td>");
Response.Write("<td rowspan='2' align='center'> IN
<br /> PROGRESS </td>");
Response.Write("<td rowspan='2' align='center'>
SUB. FOR <br /> RELEASE </td>");
Response.Write("<td rowspan='2' colspan='2'
align='center'> SUB. FOR <br /> RE-RUN </td>");
Response.Write("</tr>");
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & NOT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> NOT IN CRS <br /> BUT IN PRODN. </td>");
Response.Write("<td rowspan='1' style='width:
75px' align='center'> IN CRS <br /> & IN PRODN. </td>");
Response.Write("</tr>");
foreach (DataRow record in
dtServiceStatusInfo.Rows)
{
Response.Write("<tr>");
Response.Write("<td rowspan='1' style='width:
175px' align='center'><a
href='DatabaseControl.aspx?QStrServiceDesc="
+ record["ServiceDesc"].ToString() + "'>" +
record["ServiceDesc"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'
onclick='mywin001=window.open('DataCheckerStatusReport.htm',
700,450,null,null,'mywin001',5,true,true,true);return false'>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
//Response.Write("<td rowspan='1'
align='center'><a href='#'mywin001=OpenIt() '>" +
record["NoOfDBinCRS"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinPDN"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBinBoth"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NoOfDBProcessed"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["DCRun"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["NotOpenedDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["InProgressDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReleaseDBCnt"].ToString() + "</a></td>");
Response.Write("<td rowspan='1'
align='center'><a href='http://www.google.com'>" +
record["ReRunDBCnt"].ToString() + "</a></td>");
Response.Write("</tr>");
}
Response.Write("</table>");
dcDCHSucess = true;
}- Hide quoted text -
- Show quoted text -- Hide quoted text -
- Show quoted text -- Hide quoted text -

- Show quoted text -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top