C#/asp

Advertisement


Question
QUESTION: i want a pop up window every time product page is opened which asks what type of product usr want to add. products can be stockable,non stockable or service

ANSWER: Hello,
you do not need to do it server side (via asp or .net) you can use client side scripts such as javascript
in body tag of product page add this
<body onload="javascript:window.open('popupwindow.aspx','newWindow','height=200,width=200,menubar =no,toolbar=no,scrollbars=yes')"  >



then in popupwindow.aspx page you can add this line (it can be asp too not different because it is client side script)


<head>
       
        <script language="JavaScript">
<!--
function refreshParent() {
 window.opener.location.href = window.opener.location.href;

 if (window.opener.progressWindow)
     
{
   window.opener.progressWindow.close()
 }
 window.close();
}


//-->
</script>
</head>
<body onunload="window.opener.location.reload()">   then in this page you can have a combo box for different types of products that can be stockable etc and a button to save it on database and in the product page you can write a code that when it is reloading, it shows the different products which was saved in your DB.

protected void Page_Load(object sender, EventArgs e)
   {
       if (!Page.IsPostBack)
       {
         
         //load the database Data here
       }

   }


---------- FOLLOW-UP ----------

QUESTION: i want a pop up window every time product page is opened which asks what type of product usr want to add (Occures Only when The Value of mode = add). products can be stockable,non stockable or service

Answer
then in your product page add this javascript code
the link to your product page should be something like this
Add New products
now in product page you should add this javascript code to header tag of the page

<title>Add New products</title>


<script language="javascript" >
<!--
window.onload = function () {
  var q = (document.location.search);
  q= q.substring(6,9);//change this part if it doesn't give you "add" query string
  // uncomment this line if you want to check the query alert(q);
  if(q=='add')
  window.open('popupwindow.aspx','newWindow','height=200,width=200,menubar =no,toolbar=no,scrollbars=yes')
  -->
  }
  </script>
</head>

<body>
and your popupwindow.aspx page is like the code which I mentioned in previous posts

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Hosnieh [Sara]

Expertise

Questions which I can answers: 1- Programming (C#.net, Vb.net, javascript, HTML) more Web applications 2- CSS 3-Databases (Ms SQL server -all versions) 4-OS (workstation and servers (windows)) 5- MS office 6- General problems in computer software I cannot answer other kinds of questions which I did not mention here.

Experience

my CV: http://iran-americamarket.com/Contact.aspx I have more than 8 years Experience in IT field. my core skills are : • Asp.net Developer (Portal, Dynamic websites ,e-commercial websites) • Visual studio.net 2003,2005,2008 (VB.net , C#.net , AJAX.net) • O.O programming (n-tier Architecture) • Database (SQL server 2000-2005, Oracle9i, Ms Access) , TSQL, Stored procedures, Triggers • IIS 5-6 , SSL (Installation and configuration SSL) , Network(TCP/IP ,Active directory , DHCP, … ), Windows 2000-2003 Server Configuration and administration • UML (usecase diagram, class diagram) , Microsoft Project • Graphics Design( Photoshop , Flash ) • JavaScript , CSS, DHTML, XML • Hardware (physical installation, configuration , and driver installation) • Ms Office all versions (Ms word, Ms Access, Ms Excel, Ms Outlook , Ms FrontPage, and etc) • OS (Windows –Linux) and VMware • Network Monitoring (Solarwinds) • Computer Teacher, English Teacher • MATLAB (simulations and computation projects)

Organizations
-

Publications
Translation Experience English to Farsi • Use brain scan to predict when people will buy products . May 2008 (Published in AI Magazine) – Medicine , AI • Totally tubular motors _Tomorrow automation technology : March 2008 (Published in AI Magazine) – AI , Mechanic, Industry • Improving PLC compatibility and function flexibility: March 2008 (Published in AI Magazine) – AI , Robotics , Industry • Make packaging lines more flexible: January 2008 (Published in AI Magazine) – AI , Robotics , Industry • Personal CNC : December 2007 (Published in AI Magazine) – AI , Medical , Industry • Multipurpose optical tools Characterize as MEMS: December 2007 (Published in AI Magazine)- optical physics • Managing Innovation: November 2007 (Published in AI Magazine) – IT Management • Calculating the total value of ownership (TVO):October 2007 (Published in San-ate Hooshmand Magazine) -IT and Economics

Education/Credentials
I am currently student and doing my Master in Computer Network Engineering

Awards and Honors
- Poster about new methods of management in Organization( Entrepreneurship ) - 2007

Past/Present Clients
-

©2012 About.com, a part of The New York Times Company. All rights reserved.