exe package that includes only the front,.Q:
Can you make a Dropdownlist value NOT repeatable using.NET 2.0?
I have a dropdownlist with values 1-5. There is also a textbox, which can be used to create a new value. This is done by pressing a button.
When a user selects a value, I'm storing it in a database, however I don't want the same value to be selected again. I'm guessing this will be impossible to do in.NET 2.0?
Is there any work around this?
A:
As I already wrote in the comments, there is no way to enforce uniqueness in ASP.NET. But there are ways to prevent users from entering the same value, such as using a maskedTextBox or a similar technique.
Paulo Assis
Paulo Assis may refer to:
Paulo Assis de Almeida (born 1949), Brazilian politician
Paulo de Assis (1808–1840), Brazilian poet
Paulo Assis (athlete) (born 1976), Brazilian Paralympian athlete
Paulo Assis (footballer) (born 1955), Brazilian footballer
Paulo Assis (sport shooter) (born 1953), Brazilian sport shooter
Paulo Assis Barreto (born 1947), Brazilian Roman Catholic archbishopQ:
Generate unique filename for all csv files in a directory
I am doing some migration of some old data. A lot of data exist in the target system. So I have to migrate all data from the source system to the target system.
I am using Python 2.7.3 and it's easy to use read_csv to do so. However, it seems that read_csv will generate the filename the same for every csv file in the directory.
Is there any way I can generate a unique filename for every csv file in a directory?
Thanks!
If the target system (in your case a directory) exists you can use this code
import random
import os
import csv
random_dir = "F:/"
for dirpath, dirnames, filenames in os.walk(random_dir):
print(dirpath)
for filename in filenames:
random_filename = "{
Related links:
Comments