|
hi
i m using asp.net and sql server 2000
i enter some value in table and then bind this table to dropdown list
it sort automatically like
aaa
bbb
ccc
--select--
while i want, its should be like
--select--
aaa
bbb
ccc
pls help
thanks
|
|
|
|
|
You need to add each item using for loop. First you will add the "select" and then columns from your table
Ahsan Ullah
Senior Software Engineer
MCTS 2.0
|
|
|
|
|
when i insert first --select-- then aaa,then bbb it will automatically sort like
aaa
--select--
bbb
|
|
|
|
|
plz post your code with your server controls !
|
|
|
|
|
I want to develop a company visitors software. the software will have the following columns:
Visitors name
Purpose of visiting
Who you are visiting
time in
time out
I am having a problem in how the interface should be. I am new in programming please can you descibe for me how the interface should be. especially the time out column. the managment should be able to see those who visited.
Thank you
|
|
|
|
|
sturabumukiza wrote: I want to develop a company visitors software
Looks like your school home work.
sturabumukiza wrote: the interface should be. especially the time out column
a datetime column????
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
lol ! but it looks like school homework
|
|
|
|
|
|
Hi Experts,
I have developed this newbie pass generator system. When I click on the password generator button. It generate password for its relevant row. This is working fine when I use traces. If I remove it shows all the passwords same.
protected void PassGen_Click(object sender, EventArgs e)
{
string s,temp="";
int x;
string pass;
GridView gw = (GridView)form1.FindControl("LoginView1").FindControl("GridView1");
for (int i=0; i< gw.Rows.Count; i++)
{
CheckBox chkUpdate = (CheckBox)gw.Rows[i].Cells[0].FindControl("CheckBox1");
if (chkUpdate != null)
{
if (chkUpdate.Checked)
{
s = gw.Rows[i].Cells[6].Text;
x = 5 - s.Length;
for (int k = 0; k < x; k++)
{
temp = "0" + temp;
}
gw.Rows[i].Cells[1].Text=gw.Rows[i].Cells[5].Text + temp + gw.Rows[i].Cells[6].Text;
temp = "";
Random rand = new Random();
gw.Rows[i].Cells[2].Text = password();
}
else
{
gw.Rows[i].Cells[1].Text = "";
gw.Rows[i].Cells[2].Text = "";
}
}
}
}
private string password()
{
int d;
int maxLen = 7;
string pass="";
int i;
Random rand = new Random();
for (i = 0; i < maxLen; i++)
{
d = Convert.ToInt32(Math.Floor(rand.NextDouble() * 100));
if ((d >= 48 && d <= 57) || (d >= 65 && d <= 90) || (d >= 97 && d <= 122))
{
pass = pass + Convert.ToChar(d);}
else{
i--;
}
}
return Convert.ToString(pass);
}
}
please let me have the solutions.
Thanks & Best Regards
Jay Khatri
|
|
|
|
|
Do you bind gridview in page_load without checking postback ?
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataSet ds = new DataSet();
MySqlCommand comm = new MySqlCommand();
MySqlConnection conn1 = new MySqlConnection();
}
}
I use this. But whether I remove or keep. It don't make difference. I fas as I understand function is getting its value just once Or is that any time factor as trace is just like a wait / stop/pause.
Thanks
Jay Khatri
modified on Friday, May 29, 2009 8:02 AM
|
|
|
|
|
hi
I got the answer finally, I use System.Security.crytography namespace like this
private string password()
{
int d;
int maxLen = 7;
string pass="";
int i;
byte[] randomNumber = new byte[1];
RNGCryptoServiceProvider Gen = new RNGCryptoServiceProvider();
for (i = 0; i < maxLen; i++)
{
Gen.GetBytes(randomNumber);
d = Convert.ToInt32(randomNumber[0]);
//d = Convert.ToInt32(Math.Floor(rand.NextDouble() * 100));
if ((d >= 48 && d <= 57) || (d >= 65 && d <= 90) || (d >= 97 && d <= 122))
{
pass = pass + Convert.ToChar(d);}
else{
i--;
}
}
return Convert.ToString(pass);
}
|
|
|
|
|
I have to show confirm in my page.
i m using -
reponse.write("confirm('are u sure?')");
ho can i get its button value i.e. which is clicked "ok" or "cancle"
also how we can change text of these buttons that is replace ok with yes and cancle with No.
|
|
|
|
|
//write the below code in OnClientClick in aspx page
OnClientClick="return confirm('Are you sure you sure?')"
Padmanabhan
|
|
|
|
|
Say I have many control buttons in the ASP.NET developped web page, each upon being clicked will do some operatoin which may take some time, when the button is clicked, a progress bar(in my case, I used an animated gif) will be shown while keeping the web page being freezed (by word "freeze", I mean the web page will be made inactive when the progress bar is being displayed in the center of the window, the user can still see the web page, however, he cannot click on any controls in the web page, the web page will be active again until the operation completes and the progress bar disappear.)
Can anybody suggest how I may do the web page freezing?
|
|
|
|
|
You put a transparent div over the entire page.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Just create one div, set the opacity of it to 60, make position : absolute, set top and left, z-index anything greater... and you are done.
There is also a bug in IE 6 where select controls comes over the div, use Iframe to hide them as well.
|
|
|
|
|
Hi,
Plz solve me problem asap.
i am using named anchor for link, it is working fine when link is on same page.
but i want to open that link on other page,
i use :
Page1.html
<a href="link2.html#tips">Jump to the Useful Tips Section</a>
Page2.html
<a href="#tips">Content</a>
it is not working. plz help me
Thanks,
Farogh Haider
Web developer
|
|
|
|
|
Your problem is that you don't have a clue. Why would any of this code open the link on a new page ? Seriously. Buy a book on HTML and read it, or just try using google.
You may try here[^] for the answer. Or perhaps here[^].
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks, for reply
Actually, i have develpoed a froum application in asp.net 2.0,
when a user click on last posted, then last posted message to be display at top(max 25 post in mypage)
how i do this?
Farogh Haider
Web developer
|
|
|
|
|
Holy crap. Did you read the links I gave you ?
farogh123 wrote: Web developer
Liar.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Christian Graus wrote: Liar
lol
|
|
|
|
|
|
hi,
Actually I want to create page with resolution(size) 1024*768.
Now my pc's resolution is 1440*900.
So whenever I execute prog, in 1440*900 resolution, the website will display in centre keeping some place left and right side.
and whenever I use 1024*768 resolution, it will cover whole screen, not keeping space left or right. It will be fit to screen.
How can I get this ??
I have tried a lot but I can't get this.
Plzz help me..
Thanks & regards,
Jay
|
|
|
|
|
Use % (percent) unit of measurement.
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|