|
Hi!
In facts, my problem is to access the info in the server side! If i use ListBox.Items... It is not working but I really have two rows in my listbox... Look this:
This is my javascript code:
First i select the item in listbox1 then click on add button so add seleccted item into listbox2 and remove selected item from listbox1 using javascript.
function fctAjoutAssigne()
{
var mylist = document.getElementById("ListBox1")
var mylist2 = document.getElementById("ListBox2")
mylist2.options[mylist2.length]= new Option(mylist.options[mylist.selectedIndex].text,mylist.options[mylist.selectedIndex].value);
mylist.remove(mylist.selectedIndex)
}
and at last i click on save button. code of save button is :
For i = 0 To ListBox2.Items.Count - 1
strAssignation &= ListBox2.Items(i).Value & ","
strNomAssigne &= ListBox2.Items(i).Text & ";"
Next
But ListBox2.Items.Count = 0
even If I have two items in my list...
Amazing...
if you know then tell me how to fix this.
chetan patel
|
|
|
|
|
Hi man.
Why don't you use code behind to populate your ListBox2 instead of JavaScript?
I'm not sure how your code works but I think what happens is:
1. When you add new items with JavaScript it works no problem
2. When you clisk Save button it submits the page and you are loosing your valuse in the ListBox2.
Seems like Posting is your problem.
|
|
|
|
|
Sounds like you need some AJAX!
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Hi,
I have an issue on how to open secure aspx pages using ASP.NET 2.0 with C# using custom built user login processes.
Below is the scenario:
1)I have a custom-built login system where I prompt the user to enter their username and password (using Textbox controls) and if successful I return the user’s security level number for example Level1 or Level2.
2)If the user has Level1 access I would like them to be able to access a secure aspx page (i.e. Level1Page.aspx) similarly for users with Level2 access I would like them to access another secure aspx page (i.e. Level2Page.aspx).
3)If the user is granted Level1 access then the user should only be allowed to view Level1Page.aspx not Level2Page.aspx.
I have seen examples where the secure pages are tied in with the ASP “Login” controls that use ASP security. Unfortunately I am using my own custom built Login system.
I would appreciate any help that I get.
Thanks in advance.
Regards,
Nish
|
|
|
|
|
|
Thanks for your suggestion. The examples (links) for setting custom authentication helped me out. As you have mentioned, I set permissions in the web.config file for each secure folder to restrict users with different access level. .
Once again thanks for your help.
|
|
|
|
|
Hi,
I need to Convert MS Access Data to Notepad. Please Help.
Prya
|
|
|
|
|
Notepad is not a file format, it's a program. It can open several different file formats, but none of them can be directly converted from a database.
Do you mean that you want to export data from the database to a text file?
---
b { font-weight: normal; }
|
|
|
|
|
hi
yes your correct. I need to export data from ms access db to notepad in asp.net. Thanks for you reply.
Prya
|
|
|
|
|
I want solution on how to close all the child windows opened from parent window, on closing the parent window.
thanks in advance
Purushotham
|
|
|
|
|
I want to use GridView, and I like HyperLink columns.
But there is a problem: in contrast to DataGrids there is no my best beloved "OnItemCommand", - and I am forced to use NavigateUrl.
But how can I determine which line and which column has specified the transfer, when I will be moved because of the link button?
HilSoft
|
|
|
|
|
Not sure what you might want to do, but IMO you can have a look at the RowCommand event of the gridView control, this is the counterpart of the ItemCommand event in the datagrid control. Also, instead of using the HyperLink field you can use the Button field with the type as a link button to postback to the server and cause the RowCommand event to get fired.
|
|
|
|
|
Administrative control for windows
Hi All,
I want to write some program that control windows behavior, like hiding the desktop, disabling Ctrl+Alt+Delete, temporarily full the RAM, Hide Start Menu, and all this stuff, how can i make under .NET.
Or
To work with internet explorer settings at run time through asp.net cod
Such as disabling "Back button" in Browser , Disbaling tools menu, etc.
plz help me to do it.
nikki
|
|
|
|
|
chnikhil wrote: To work with internet explorer settings at run time through asp.net cod
Such as disabling "Back button" in Browser , Disbaling tools menu, etc.
You can't alter the browser through asp.net. All you can alter is some of how it displays.
|
|
|
|
|
Hi... Good Day!
I have a question about show data in datagrid footer.
I need to show the value of the textbox in datagrid footer, how do i write the code to assign the textbos value to be shown in datagrid footer?
Can anyone help me to solve this problem?
Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
If you know the value which you want to put into the footer then you can do that in the OnItemDataBound event of the datagrid.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I have try to do it in OnItemDataBound, but no data is display out in footer.
The textbox and the datagrid are in the same page. I just need to display the data in the textbos in the datagrid footer.
Can you give me some code how to write it? Thanks.
Best Regards,
Pei Sun
|
|
|
|
|
|
Sorry, this cannot solve the problem.
Let me explain again.
In my page, i have a textbox which will contain the currency type value.
I need to display this value under one of the footer column in the datagrid.
Can we do like this? If yes, how the code looks like. Thanks...
Best Regards,
Pei Sun
|
|
|
|
|
Can't you do something like this:
if (e.Item.ItemType == ListItemType.Footer)<br />
{<br />
e.Item.Cells[1].Text = "some label text " + TextBox1.Text;<br />
}
Best Regards,
Apurva Kaushal
|
|
|
|
|
i have tried it. Only the word "some label text" is displayed out.
Best Regards,
Pei Sun
|
|
|
|
|
ypsyong wrote: i have tried it. Only the word "some label text" is displayed out.
Do you have any text in the textbox because if something is there then there won't having any reason for the text not getting shown.
Best Regards,
Apurva Kaushal
|
|
|
|
|
I have tried to use another label to retrieve the textbox value. Its work and the label can display the data of the textbox. But i don't know why in datagrid footer cannot.
Best Regards,
Pei Sun
|
|
|
|
|
You debug the application and see whether you are getting the value at that line of code.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thanks for your help. I already get the idea and solved the problem. Thanks..
Best Regards,
Pei Sun
|
|
|
|