Actually i m using visual studio .net but thanks for your reply naman and i just got the answer.If any one would like to refer...
In the parent page we will have say one textbox and one button then the code for it is
parent.aspx
in html code we have
<asp:TextBox id="first" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 24px" runat="server"></asp:TextBox>
<asp:Button id="Input" style="Z-INDEX: 102; LEFT: 176px; POSITION: absolute; TOP: 24px" runat="server" Text="Open..."></asp:Button>
and parent.aspx.vb
in page load event we will write
Input.Attributes.Add("onclick", "var strReturn; strReturn=window.showModalDialog('child.aspx',null,'status:no;dialogWidth:370px;dialogHeight:220px;dialogHide:true;help:no;scroll:no');if (strReturn != null) document.getElementById('first').value=strReturn;")
And suppose child page
child.aspx
if it contains one textbox and two buttons again in html window
<asp:TextBox id="second" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 24px" runat="server"></asp:TextBox>
<asp:Button id="btnOK" style="Z-INDEX: 103; LEFT: 48px; POSITION: absolute; TOP: 56px" runat="server" Text="Ok" Width="56px"></asp:Button>
<asp:Button id="btnCancel" style="Z-INDEX: 102; LEFT: 112px; POSITION: absolute; TOP: 56px" runat="server" Text="Cancel"></asp:Button>
and child.aspx.vb will have in the page load event
btnOK.Attributes.Add("onclick", "window.returnValue = document.getElementById('second').value; window.close();")
btnCancel.Attributes.Add("onclick", "window.close();")
Complete.