473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

assign / remove dept for employees

145 100+
I need little direction on how to achieve something like this in asp.net.

http://www.use.com/81ae4420fd7f7aab9612

here is the old vb6.

1. The goal is to pick an employee from a gridview. How? (the first column in the gridview is emp_id)?
2. then click on a button on the parent page to pop up second window with selected employee from the parent page. How?
3. Do I need to create 2 list box to achive like this print shot "http://www.use.com/81ae4420fd7f7aab9612"? Need little detail direction on what all do I need to use in order to make it like the linked print shot.
Mar 26 '09 #1
2 1113
Frinavale
9,735 Expert Mod 8TB
You could use a ListBox or GridView to accomplish this.
It's up to you which you prefer.

I wouldn't recommend opening another window with selected employee but it's possible. You'd store the employee selected in session so that it could be accessed in another aspx page....or pass it to the other page in the URL....when you clicked the button you'd use JavaScript to open a new browser window, calling the aspx page.

The reason I don't recommend displaying the selected employee in a pop up window is because I'm sure that your next step will require updating the parent window after the child one closes...and this is very annoying (trust me).

I would recommend creating a Web User Control instead so that you can place it on the same page. When the user clicks the button to display employee information the control would be made visible.

Using CSS you can make things appear to float on top of the rest of the page. You can even let the user move it around by using the free DragPanel extender.

Really, this solution will save you a lot of headache.

But, you may require the child window to open...


Why don't you give this project a try and when you get stuck on something ask for help at that point and we'll be right here to get you through your problems.

-Frinny
Mar 26 '09 #2
dorandoran
145 100+
Thanks Frinny for your input. I really needed the help with the direction. I can now move forward and start the coding. I am using this code to populate a textbox on parent window so I transfer emp_id to child window and populated listbox (a sql statement) with the department that employee belong to. Thanks again for your help and direction.

Expand|Select|Wrap|Line Numbers
  1. protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)
  2.     {
  3.         TextBox1.Text = GridView2.SelectedValue.ToString();  
  4.     }
  5.  
Mar 26 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Eddie | last post by:
Hi to all I am building a database to track project expenses information. My database has 4 main tables, Employees, Activity, project info and rates. We add a project and track activities on...
5
by: Robert Zurer | last post by:
I have a large pool of business objects all referencing one another in various ways. In the client application I want to do something like employee.Delete(); Behind the scenes, I want to...
4
by: hb | last post by:
Hi, When I add an asp:button (ex: id=btnLog) on home.aspx, I need to create btnLog_Click() event in home.aspx.cs, and also link this event and the button in OnInit() method by adding:...
7
by: Chris Wertman | last post by:
I am so lost on this one. Dim Ary as Integer = New Integer(4) {0,1,2,3} FAILS with the error: Array initializer has 1 too few elements. So I try Dim Ary as Integer = New Integer(3)...
7
by: Chris Brat | last post by:
Hi, Is there a better way to replace/remove characters (specifically ' and " characters in my case, but it could be anything) in strings in a list, than this example to replace 'a' with 'b': ...
37
by: bahoo | last post by:
Hi, I have a list like and as output I want If I myList.remove('0024') then only the first instance of '0024' is removed.
4
by: radiolandog | last post by:
string s = "G618964"; if (s == 'G') { s.Remove(0,1); } // after stepping through this code, s = "G618964" // I was anticipating s = "618964";
1
by: turnerca902 | last post by:
Hi Folks, I am working on a little project and hoping someone out there might offer me some info/insight. I have a folder containing about 50 html files where the contents look like this: ...
1
by: ahd2008 | last post by:
I know how to use queries but what if there is a button on a form that use a query to assing the result to a value? For example this query will gives the totall of the all employees whish is 5...
3
by: lizBeth | last post by:
Hi all, i seem to have gotten stuck on this coursework, i am unsure as to how to implement a method in the main class to calculate the sum of all employees monthly salaries. Everything...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.