|
I have Alphabets a to z on the home of my websitte for displaying adverstisement links.By clking on an alphabet i have to display all the links starting with that letter.Now I need a colander type of box and put A, B, C, D up to Z to do the same
can you help me out in this.
Thnak You for your timely reply
|
|
|
|
|
What you need to do, is sort your links by the first letter, then show the letters as links. Make them all link to the same page with a querystring like MyColander.aspx?letter=A
Then you can write one page that gets the letter, passes it to the database and returns just those links. Just write a proc that returns a LIKE query using that querystring value, then you could also support any sort of substring search
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
A colander[^]? I don't know what you mean, a "colander" type of box doesn't make any sense at all to me.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
How to remove the blank spaces in middle in the string using asp.net 2.0
Example
Reminder 1 replace Reminder1
|
|
|
|
|
shanthi jothi wrote: Example
Reminder 1 replace Reminder1
string strOrginal = "Reminder 1";
string strReplace=strOrginal.Replace(" ","");
BTW : Its is nothing related with asp.net, its just simple C# code.
cheers,
Abhijit
|
|
|
|
|
|
You should buy a basic C# book study it carefully.
Cheers!!
Brij
|
|
|
|
|
Apart from learning some C#, you should understand ASP.NET well enough to understand that this is NOT an ASP.NET question. It's a 'I really don't know C# at all and should not be working on websites until I've read a basic book and learned to use google' question. those go in the C# forum.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi!
I have a little problem. My problem is:
I have two user.
If first user Enter Own LogIn & password. It goes to another page i.e. "first.aspx".
If second user Enter Own LogIn & password. It goes to another page i.e. "second page.aspx.
My login page is common for both user.
I have use this code but it goes only one page. Actually I don't know what can I do. Please solve my problem.
protected void Button1_Click(object sender, EventArgs e)
{
string name = TextBox1.Text;
string password = TextBox2.Text;
string str = " select * from login where user_name ='"+name+"' and password ='"+password+"'";
SqlDataAdapter da= new SqlDataAdapter(str,con);
da.Fill(ds,"a");
if ((ds.Tables[0].Rows.Count) == 0)
{
Label1.Text = "User Does not Exist";
}
else
{
Response.Redirect("first.aspx");
}
thanx in advance
|
|
|
|
|
else
{
if(firstUser)
Response.Redirect("first.aspx");
else if(secondUser)
Response.Redirect("second.aspx");
}
ahmad25 wrote: string str = " select * from login where user_name ='"+name+"' and password ='"+password+"'";
Read about Sql Injection attacks and change this query to parameterized.
|
|
|
|
|
Thanx for your kind attention.
But I couldn't understand what am i write in place of
<pre>firstuser from if(firstuser).</pre>
If possible please tell me.
in my login database I stored two user. Details below :
<u>User_name</u> <u> password</u>
amit kumar
vijay anand
|
|
|
|
|
ahmad25 wrote: But I couldn't understand what am i write in place of
Why not ? Navaneeth, has completely written the code for you.
cheers,
Abhijit
|
|
|
|
|
hi!sir
but when i write firstuser.it gives error.
because my first user id is 'arun' & password is 'kumar'and second user user id is 'vijay' and password is 'raj'
|
|
|
|
|
ahmad25 wrote: string str = " select * from login where user_name ='"+name+"' and password ='"+password+"'";
What ever the Navaneeth , suggested is 100% correct. Please be care of SQL Injection . Never use SQL query in this way. Always create stored procedure, execute stored procedure form code .
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: Always create stored procedure, execute stored procedure form code .
That depends. To avoid SQL Injection, you only need parameterized queries. Stored procedures are not must. And I personally don't like writing SP's for every query what I write. This[^] is an interesting read.
|
|
|
|
|
N a v a n e e t h wrote: you only need parameterized queries.
Yaa.. I also do some times for my own code and utility , but some times may not in live project , cause its not in my hand to decides. But now I have some points.... Thanks for the links !!!
BTW : Now your are another coming Fixture in CP . All The Best for Future and Thanks for your Efforts !!!
cheers,
Abhijit
|
|
|
|
|
Thanks. I appreciate it
|
|
|
|
|
Hi There ,
I have a button which I had taken through java script code in div tag.And I want to do alignment of that button to center.Can anybody tell me how to do alignment in div tag.
|
|
|
|
|
Use Table Inside Div . Create Column , Place Content inside That.
cheers,
Abhijit
|
|
|
|
|
Thanks For Reply,
I will check with this solution.
|
|
|
|
|
Urgh - instead create a CSS style that has vertical-align:middle and assign that style to the DIV.
It definitely isn't definatley
|
|
|
|
|
|
Please ignore.
Cheers!!
Brij
|
|
|
|
|
|
umeshrajpoot wrote: why ignore ??????
This forum is not for posting the Questions blindly.So Don't spam.Always put the Qs in right forum and answers will be given by the CP users.Posting many doesn't help anybody except irretating.
Cheers!!
Brij
|
|
|
|