Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 5th, 2007, 07:43 AM
Authorized User
 
Join Date: Nov 2006
Location: Bangalore, Karnataka, India.
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Somesh
Default Problem in view in proper order

Hi,
All
I am trying to wite a html page by XML DOM.
I found that after writinh the pahe the the source code of note pad is comming like:-
<%@ Page Language=C# AutoEventWireup=true CodeFile=Default3.html Inherits=Default3 %><!DOCTYPEhtml 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 ><script language=javascript type=text/javascript>// <!CDATA[function Submit1_onclick() {Response.Redirect(Default2.aspx)}// ]]></script><br /><Title>You can generate the report</Title><body><form id=form1 runat=server><div></div><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox0 type=checkbox /></td><td width=150px>EmployeeID</td><td width=150><input id=Text0 position= center type=text /></td><td width=100><select id=Select0 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox1 type=checkbox /></td><td width=150px>FirstName</td><td width=150><input id=Text1 position= center type=text /></td><td width=100><select id=Select1 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox2 type=checkbox /></td><td width=150px>LastName</td><td width=150><input id=Text2 position= center type=text /></td><td width=100><select id=Select2 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox3 type=checkbox /></td><td width=150px>Gender</td><td width=150><input id=Text3 position= center type=text /></td><td width=100><select id=Select3 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox4 type=checkbox /></td><td width=150px>Designation</td><td width=150><input id=Text4 position= center type=text /></td><td width=100><select id=Select4 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox5 type=checkbox /></td><td width=150px>Skill</td><td width=150><input id=Text5 position= center type=text /></td><td width=100><select id=Select5 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox6 type=checkbox /></td><td width=150px>JoinDate</td><td width=150><input id=Text6 position= center type=text /></td><td width=100><select id=Select6 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox7 type=checkbox /></td><td width=150px>ResignationDate</td><td width=150><input id=Text7 position= center type=text /></td><td width=100><select id=Select7 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox8 type=checkbox /></td><td width=150px>Reason</td><td width=150><input id=Text8 position= center type=text /></td><td width=100><select id=Select8 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox9 type=checkbox /></td><td width=150px>Status</td><td width=150><input id=Text9 position= center type=text /></td><td width=100><select id=Select9 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox10 type=checkbox /></td><td width=150px>DateOfBirth</td><td width=150><input id=Text10 position= center type=text /></td><td width=100><select id=Select10 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox11 type=checkbox /></td><td width=150px>PermanentAddress</td><td width=150><input id=Text11 position= center type=text /></td><td width=100><select id=Select11 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox12 type=checkbox /></td><td width=150px>PresentAddress</td><td width=150><input id=Text12 position= center type=text /></td><td width=100><select id=Select12 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox13 type=checkbox /></td><td width=150px>PhoneNo</td><td width=150><input id=Text13 position= center type=text /></td><td width=100><select id=Select13 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox14 type=checkbox /></td><td width=150px>MobileNo</td><td width=150><input id=Text14 position= center type=text /></td><td width=100><select id=Select14 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox15 type=checkbox /></td><td width=150px>OfficePhoneNo</td><td width=150><input id=Text15 position= center type=text /></td><td width=100><select id=Select15 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox16 type=checkbox /></td><td width=150px>EmailAddress</td><td width=150><input id=Text16 position= center type=text /></td><td width=100><select id=Select16 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></><table width=100% border=1 cellspacing=0 cellpadding=0><tr><td width=5px><input id=Checkbox17 type=checkbox /></td><td width=150px>PersonalEmailAddress</td><td width=150><input id=Text17 position= center type=text /></td><td width=100><select id=Select17 name=Employeecode style=width: 108px><option selected=selected value=0>Select</option><option value=1>Total</option><option value=2>Bigenes With</option><option value=3>Ends With</option><option value=4>&lt;</option><option value=5>&lt;=</option><option value=7>=</option><option value=8>&gt;</option><option value=9>&gt;=</option></select></td></tr></table><br/></></form></body></html>&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp&nbsp &nbsp &nbsp&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp &nbsp&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp<input id=Button1 type=button value=Submit onclick=return Botton1_click()/></body>


But I need to she in proper order like:-
<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>alphawave corporation - Join Our Team</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<Meta Name="keywords" Content="Foreign nurse recruitment, Nursing recruitment, Nursing shortage, Healthcare resource shortage, Healthcare jobs, Healthcare recruitment, Healthcare resource shortage, Healthcare jobs, Healthcare recruitment, Nursing registry, Nursing jobs, Hospital staffing, US nursing jobs, US healthcare resource shortage, US healthcare jobs, US healthcare recruitment, Indian nurse recruitment, Indian nurses, Indian healthcare recruiting, Physical Therapists">
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-image:url('Images/bullet.gif');

}
.style33 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-small;
    color: #333333;
}
.style31 {color: #333333}
.style32 {color: #FF0000}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('Images/candidate_login2.gif','Images/client_login2.gif','Images/empolyee_login2.gif','Images/candidate_login22.gif','Images/client_login22.gif','Images/empolyee_login22.gif','Images/empolyee_login33.gif','Images/client_login33.gif','Images/candidate_login33.gif','Images/job_openings33.gif','Images/job_openings22.gif','Images/home2_new.gif','Images/careers2_new.gif','Images/res_links2_new.gif','Images/alliances2_new.gif','Images/about_us2_new.gif','Images/contact_us2_new.gif','Images/ser_sol2_new.gif')">
<form action = "join_success.jsp" method="POST" ENCTYPE="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="*">&nbsp;</td>
    <td width="100%"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="6" height="85" background="Images/Logo_Complete_01.gif"><div align="right"></div></td>
        <td width="75" height="85" background="Images/Logo_Complete_02.gif">&nbsp;</td>
        <td width="8" height="85" background="Images/Logo_Complete_03.gif">&nbsp;</td>
        <td width="216" height="85" valign="middle" background="Images/Logo_Complete_04.gif">&nbsp;</td>
        <td width="166" height="85" valign="middle" background="Images/Logo_Complete_05.gif">&nbsp;</td>
        <td valign="middle" background="Images/Logo_Complete_06.gif">&nbsp;</td>
      </tr>
    </table>
      <table width="800" height="25" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="25" background="Images/bg_button_Curve2.gif"><div align="left"></div></td>
    <td background="Images/bg_button_Curve2.gif">&nbsp;</td>
    <td width="94" background="Images/bg_button_Curve2.gif"><a href="job_openings.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image17','','Images/job_openings33.gif',1)"><img src="Images/job_openings3.gif" name="Image17" width="94" height="20" border="0"></a></td>
    <td width="110" background="Images/bg_button_Curve2.gif"><a href="candidate_login.jsp?role=1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','Images/candidate_login33.gif',1)"><img src="Images/candidate_login3.gif" name="Image16" width="110" height="20" border="0"></a></td>
    <td width="84" background="Images/bg_button_Curve2.gif"><a href="client_login.jsp?role=2" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','Images/client_login33.gif',1)"><img src="Images/client_login3.gif" name="Image15" width="84" height="20" border="0"></a></td>
    <td width="99" background="Images/bg_button_Curve2.gif"><a href="employee_login.jsp?role=3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','Images/empolyee_login33.gif',1)"><img src="Images/empolyee_login3.gif" name="Image14" width="99" height="20" border="0"></a></td>
    <td width="20" background="Images/bg_button_Curve2.gif">&nbsp;</td>
  </tr>
</table>
      <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="7" rowspan="7" bgcolor="#EBEBEB"><img src="Images/join_our_team_img_New.jpg" width="610" height="147"></td>
    <td height="21" valign="top" bgcolor="#FFFFFF"> <div align="left"><a href="home.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image19','','Images/home2_new.gif',1)"><img src="Images/home1_new.gif" name="Image19" width="190" height="21" border="0"></a></div></td>
</tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="services_solutions.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image28','','Images/ser_sol2_new.gif',1)"><img src="Images/ser_sol1_new.gif" name="Image28" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="careers.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image21','','Images/careers2_new.gif',1)"><img src="Images/careers1_new.gif" name="Image21" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="resources_links.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image22','','Images/res_links2_new.gif',1)"><img src="Images/res_links1_new.gif" name="Image22" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="alliances.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image23','','Images/alliances2_new.gif',1)"><img src="Images/alliances1_new.gif" name="Image23" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="about_us.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image24','','Images/about_us2_new.gif',1)"><img src="Images/about_us1_new.gif" name="Image24" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td height="21" valign="top" bgcolor="#FFFFFF"><a href="contact_us.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image25','','Images/contact_us2_new.gif',1)"><img src="Images/contact_us1_new.gif" name="Image25" width="190" height="21" border="0"></a></td>
  </tr>
  <tr>
    <td width="20" height="20" bgcolor="#8A8A8A"><img src="Images/bullet2.gif" width="21" height="18"></td>
    <td width="580" height="20" colspan="5" valign="middle" bgcolor="#8A8A8A"><img src="Images/09_joinT.gif" width="112" height="18"></td>
    <td width="10" height="20" bgcolor="#8A8A8A">&nbsp;</td>
    <td height="20" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
  </tr>
  <tr>
    <td width="20" height="175" rowspan="14" bgcolor="#EBEBEB"><img src="Images/spacer20.gif" width="20" height="20"></td>
    <td height="110" colspan="5" valign="top" bgcolor="#EBEBEB"><p align="justify" class="style33"><br>
      Congratulations on taking the first step to enabling your professional career and your personal aspirations! Our global recruiting team is waiting to hear from you.</p>
      <p align="justify" class="style33">You can <a href="contact_us.htm" class="style31">contact us</a> in a manner most convenient to you, however, to expedite your application please fill out the following online application:</p>
      </td>
    <td width="10" height="175" rowspan="14" bgcolor="#EBEBEB"><img src="Images/spacer10.gif" width="10" height="10"></td>
    <td height="112" rowspan="14" valign="top" bgcolor="#FFFFFF">
    <table width="190" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="21" bgcolor="#FFFFFF"><a href="why_alphawave.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image26','','Images/why_alphawave2_New.gif',1)"><img src="Images/why_alphawave1_New.gif" name="Image26" width="190" height="21" border="0"></a></td>
      </tr>
      <tr>
        <td height="21" bgcolor="#FFFFFF"><a href="join_our_team.jsp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image27','','Images/join_our_team2_New.gif',1)"><img src="Images/join_our_team1_New.gif" name="Image27" width="190" height="21" border="0"></a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25" colspan="5" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
  </tr>
  <tr>

  <SCRIPT LANGUAGE=javascript>
    function check()
    {
        function fnTrim(strData)
        {
        while (strData.substr(0,1) == ' ')
        {
        strData = strData.slice(1,strData.length)
        }
        return (strData);
        }

    if ((document.forms[0].firstName.value=="")||(fnTrim(document.forms[0].firstName.value).length==0))
    {
    alert("Enter First name ")
    document.forms[0].firstName.focus()
    return(false)
    }
    var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ .";
    var checkStr = document.forms[0].firstName.value;
    var allValid = true;
    var decPoints = 0;
    var allNum = "";
    for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
    if (ch == checkOK.charAt(j))
    break;
    if (j == checkOK.length) {
    allValid = false;
    break;
    }
    //if (ch != ",")
    if (ch !=ch)
    allNum += ch;
    }
    if (!allValid)
    {
    alert("Your First name should include characters")
    document.forms[0].firstName.focus()
   return (false);
    }


    if ((document.forms[0].lastName.value=="")||(fnTrim(document.forms[0].lastName.value).length==0))
    {
    alert("Enter Last name ")
    document.forms[0].lastName.focus()
    return(false)
    }
    var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ. ";
    var checkStr = document.forms[0].lastName.value;
    var allValid = true;
    //var decPoints = 0;
    var allNum = "";
    for (i = 0; i < checkStr.length; i++) {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
    if (ch == checkOK.charAt(j))
    break;
    if (j == checkOK.length) {
    allValid = false;
    break;
    }
    //if (ch != ",")
    if (ch !=ch)
    allNum += ch;
    }
    if (!allValid)
    {
    alert("Your Last name should include characters")
    document.forms[0].lastName.focus()
    return (false);
    }

    if ((document.forms[0].email.value=="")||(fnTrim(document.forms[0].email.value).length==0))
    {
    alert("Enter email address")
    document.forms[0].email.focus()
    return (false)
    }

    if ((document.forms[0].email.value!= "")&&((document.forms[0].email.value.indexOf('@',0) == -1) || (document.forms[0].email.value.indexOf('.',0) == -1)|| (document.forms[0].email.value.length < 5)))
    {
    alert("Enter valid email address.");
    document.forms[0].email.focus();
    return (false);
    }

    /*if (((document.forms[0].coverletter.value=="")||(fnTrim(document.forms[0].coverletter.value).length==0))&&(document.forms[0].file1.value==""))
    {
    alert("Upload your resume using the browse button or paste it along with your covering letter")
    document.forms[0].coverletter.focus()
    return(false)
    }
    */
    //return (true)

    }
</SCRIPT>

   <td width="280" height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">* First Name </span></div></td>
    <td width="5" rowspan="12" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="5" rowspan="12" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="firstName"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">* Last Name</span></div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="lastName"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">* Email</span></div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="email"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">Contact No.</span></div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="contactNumber"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">Job Category</span></div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="jobCategory"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB" class="style33"><div align="right">Location</div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="location"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB"><div align="right"><span class="style33">Expected Salary</span></div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input type="text" name="expectedSalary"></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB" class="style33"><div align="right">* Upload Resume </div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><input name="Browse" type="file" class="style33" id="Browse" value="Browse..."></td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB" class="style33"><div align="right">Comments</div></td>
    <td width="10" valign="top" bgcolor="#EBEBEB"><div align="center">:</div></td>
    <td width="280" valign="top" bgcolor="#EBEBEB"><textarea name="comments" cols="22" value="" class="style33"></textarea></td>
  </tr>
  <tr>
    <td height="10" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="280" valign="middle" bgcolor="#EBEBEB">&nbsp;</td>
  </tr>
  <tr>
    <td height="25" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="280" valign="middle" bgcolor="#EBEBEB"><input name="Submit" type="submit" class="style33" value="Submit" onclick="return check()" >&nbsp;&nbsp;&nbsp;<input name="Reset" type="reset" class="style33" id="Reset" value="Reset"></td>
  </tr>
  <tr>
    <td height="20" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="10" valign="top" bgcolor="#EBEBEB">&nbsp;</td>
    <td width="280" valign="middle" bgcolor="#EBEBEB">&nbsp;</td>
  </tr>
</table>
      <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td width="20" height="20" bgcolor="#EBEBEB"></td>
    <td width="87" bgcolor="#EBEBEB"><a href="job_openings.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image18','','Images/job_openings22.gif',1)"><img src="Images/job_openings11.gif" name="Image18" width="87" height="14" border="0"></a></td>
    <td width="110" bgcolor="#EBEBEB"><a href="candidate_login.jsp?role=1" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('candLogin','','Images/candidate_login22.gif',1)"><img src="Images/candidate_login11.gif" alt="Candidate Login" name="candLogin" width="110" height="14" border="0"></a></td>
    <td width="84" bgcolor="#EBEBEB"><a href="client_login.jsp?role=2" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('cliLogin','','Images/client_login22.gif',1)"><img src="Images/client_login11.gif" alt="Client Login" name="cliLogin" width="84" height="14" border="0"></a></td>
    <td width="99" bgcolor="#EBEBEB"><a href="employee_login.jsp?role=3" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('empLogin','','Images/empolyee_login22.gif',1)"><img src="Images/empolyee_login11.gif" alt="Employee Login" name="empLogin" width="99" height="14" border="0"></a></td>
    <td width="210" bgcolor="#EBEBEB"></td>
    <td width="190" bgcolor="#FFFFFF"></td>
    </tr></table>
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td width="20" bgcolor="#0047A0">&nbsp;</td>
  <td bgcolor="#0047A0">&nbsp;</td>
  <td width="252" height="23" bgcolor="#0047A0"><div align="right"><img src="Images/coptright.gif" width="252" height="15"></div></td>
  <td width="20" bgcolor="#0047A0">&nbsp;</td>
</tr></table> </td>
    <td width="*">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>

I am sending the raw code.
Raw codes:-
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

        int abc;
        abc = GridView1.Columns.Count;
        TextBox1.Text = abc.ToString();
        string[] MyArray;
        MyArray = new string[abc];
        int m = abc;
        int j = 0;
        int i = 0;
        for (i = 0; i < m; i++)
        {
            string Clnt = GridView1.HeaderRow.Cells[j].Text;

            MyArray[j] = Clnt;
            j = j + 1;
        }
        //string xmlFilePath = @"C:\Documents and Settings\somesh.c.BSSAS0\My Documents\Visual Studio 2005\WebSites\WebSite10\Employees.xml";
        string htmlpath = @"E:Website2\Employee.html";


        try
        {

            //XmlDocument doc = new XmlDocument();
            //HtmlTextWriter writer1 = new HtmlTextWriter();
            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            settings.ConformanceLevel = ConformanceLevel.Auto;
            settings.IndentChars = "\t";
            settings.OmitXmlDeclaration = true;
            using (XmlWriter writer = XmlWriter.Create(htmlpath, settings))
            {

               // writer.WriteChars("/<%@ Page Language=C# AutoEventWireup=true CodeFile=Default3.html Inherits=Default3 %>");

                writer.WriteRaw ("<%@ Page Language=C# AutoEventWireup=true CodeFile=Default3.html Inherits=Default3 %>");
                writer.WriteRaw("<!DOCTYPE");
                writer.WriteRaw("html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>");
                writer.WriteRaw ("<html xmlns=http://www.w3.org/1999/xhtml >");
                //writer.WriteAttributeString("xmlns", null, "http://www.w3.org/2000/10/XMLSchema");
                //writer.WriteRaw("<head runat=server>");
                writer.WriteRaw("<script language=javascript type=text/javascript>");
                writer.WriteRaw("// <!CDATA[");

                writer.WriteRaw("function Submit1_onclick() {");
                writer.WriteRaw ("Response.Redirect(Default2.aspx)");
                //writer.WriteRaw("Text1.value =100;");
                writer.WriteRaw("}");

                writer.WriteRaw("// ]]>");
                writer.WriteRaw("</script>");
                writer.WriteRaw("");
                writer.WriteStartElement("br");
                writer.WriteEndElement();

                writer.WriteStartElement("Title");
                writer.WriteRaw("You can generate the report");
                writer.WriteEndElement();

                writer.WriteStartElement("body");
                writer.WriteRaw("<form id=form1 runat=server>");
                writer.WriteRaw("<div>");
                writer.WriteRaw("</div>");


                // doc.Load(xmlFilePath);
                i = 0;
                for (i = 0; i < m; i++)
                {
                   // string flag =ToString(i);
                    string clnt;
                    clnt = MyArray[i];

                    writer.WriteRaw("<table width=100% border=1 cellspacing=0 cellpadding=0>");
                    writer.WriteRaw("<tr>");
                    writer.WriteRaw("<td width=5px>");
                    string flag = i.ToString();

                    writer.WriteRaw("<input id=Checkbox");
                    writer.WriteString(flag);
                    writer.WriteRaw(" ");

                    writer.WriteRaw("type=checkbox />");
                    writer.WriteRaw("</td>");
                    writer.WriteRaw("<td width=150px>");
                    writer.WriteString(clnt);
                    writer.WriteRaw("</td>");
                    writer.WriteRaw("<td width=150>");
                    writer.WriteRaw("<input id=Text");
                    writer.WriteString(flag);
                    writer.WriteRaw(" ");
                    writer.WriteRaw("position= center type=text />");
                    writer.WriteRaw("</td>");
                    writer.WriteRaw("<td width=100>");
                    writer.WriteRaw("<select id=Select");
                    writer.WriteString(flag);
                    writer.WriteRaw(" ");
                    writer.WriteRaw("name=Employeecode style=width: 108px>");
                    writer.WriteRaw("<option selected=selected value=0>Select</option>");
                    writer.WriteRaw("<option value=1>Total</option>");
                    writer.WriteRaw("<option value=2>Bigenes With</option>");
                    writer.WriteRaw("<option value=3>Ends With</option>");
                    writer.WriteRaw("<option value=4>&lt;</option>");
                    writer.WriteRaw("<option value=5>&lt;=</option>");
                    writer.WriteRaw("<option value=7>=</option>");
                    writer.WriteRaw("<option value=8>&gt;</option>");
                    writer.WriteRaw("<option value=9>&gt;=</option>");

                    writer.WriteRaw("</select>");
                    writer.WriteRaw("</td>");
                    writer.WriteRaw("</tr>");
                    writer.WriteRaw("</table>");


                    writer.WriteRaw("<br/>");
                    writer.WriteRaw("</>");

                }
                writer.WriteRaw("</form>");
                writer.WriteRaw("</body>");
                writer.WriteRaw("</html>");
                //string get;
                //get = "return Button1_onclick()";
                writer.WriteRaw("&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp&nbsp &nbsp &nbsp&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp&nbsp &nbsp &nbsp&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp");
                //writer.WriteRaw("<asp:Button ID=Button1 runat=server OnClick=Button1_Click Style=z-index: 103;left: 339px; position: absolute; top: 352px Text=Button />");
                //writer.WriteString("get");
                //writer.WriteRaw("<asp:Button ID=Button1 runat=server OnClick=Button1_Click Text=Button />");
                //writer.WriteElementString ("input id=Button1 type=button value=Submit onclick="return Button1_onclick()"/");
                //writer.WriteRaw("<input id=Button1 type=button value=Submit onclick=return Button1_onclick()/>");
                //writer.WriteString("get");
                //writer.WriteRaw("<asp:Button ID=Button1 runat=server OnClick=Button1_Click Text=Button />");
                //writer.WriteElementString("hjk;"jkhjh";llklk");
                string som = "return Botton1_click()";
               writer.WriteRaw ("<input id=Button1 type=button value=Submit onclick=");
                writer.WriteString (som );
                writer.WriteRaw("/>");
            }


        }

        catch (Exception ex)
        {
            Response.Write("An Exception occurred: " + ex.Message);
        }

      Response.Redirect("Employee.html");
    }
}


If any one can solve this please tell me.
Somesh
__________________
somesh chaterjee
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem to view in proper oredr. Somesh XSLT 1 March 5th, 2007 08:30 AM
SQL "Order By" problem bear88 SQL Language 3 April 13th, 2005 10:45 AM
SQL "Order By" problem bear88 SQL Language 1 April 12th, 2005 12:18 AM
Descending order Query problem dssachdeva SQL Language 1 September 17th, 2003 11:44 AM
Desc order problem dssachdeva Oracle 0 September 17th, 2003 04:42 AM



All times are GMT -4. The time now is 08:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.