|
One thing I forgot to mention is that I want to keep the hightlighted row as the selected row.
Thanks,
Steve
|
|
|
|
|
Hi Steve,
In RowDatabound events(.Net2.0) or ItermCreated event(.Net1.1)you can write below code for highlight selected row.
.Net1.1
e.Item.Attributes.Add("OnMouseOver", "this.style.backgroundColor = 'lightblue';")
e.Item.Attributes.Add("OnMouseOut", "this.style.backgroundColor = 'red;")
.Net2.0
e.Row.Attributes.Add("OnMouseOver", "this.style.backgroundColor = 'lightblue';")
e.Row.Attributes.Add("OnMouseOut", "this.style.backgroundColor = 'red;")
Can you try this and if you face any further problem then let me know here.
Parwej Ahamad
R & D with IIS 5.0/6.0
modified on Tuesday, June 10, 2008 12:08 PM
|
|
|
|
|
Parwej,
The code you sent appears to work for changing the color of the row that the mouse hovers over. I still want this effect; however, I also want the last selected row to keep its selected background color (say Yellow) and also be identified as the current selected row.
Thanks,
Steve
|
|
|
|
|
Hi Steve,
You can try this, if you wants on single click:
e.Row.Attributes.Add("OnClick", "this.style.backgroundColor = 'yellow';")
Parwej Ahamad
R & D with IIS 5.0/6.0
|
|
|
|
|
I'm trying to fetch all the url given on a webpage from a website and
tried with webclient, webrequest also i'm a beginner so facing problems in writing the exact code.
i just want to get a list of all url from a webpage
also i tried this code but error is there...
code is:
using c#
string strURL = textBox1.Text;
mshtml.HTMLDocument objMSHTML = new mshtml.HTMLDocument();
HtmlDocument objDocument = new HtmlDocument();
objDocument = objMSHTML.createDocumentFromUrl(strURL, "");
i want to parse a webpage and get the url from it.
please can anyone help.
public string webcl(string url)
{
WebClient wb = new WebClient();
Stream returnval;
returnval = wb.OpenRead(url);
StreamReader sr = new StreamReader(returnval);
MessageBox.Show(sr.ReadToEnd().ToString());
string st=(sr.ReadToEnd().ToString());
return (st);
}
using webclient i did this and its running. but i'm getting all the html content of page. i need only url from it.
Paritosh Tripathi
B.Tech. (C.S.)
|
|
|
|
|
Technobizz wrote: Subject:hii please if anyone can help me would be great!!!
You should read the guide on how to ask intelligent questions.
This is also not an ASP.NET question.
Technobizz wrote: but i'm getting all the html content of page. i need only url from it.
What did you expect ? There is no method to ask for URLs from a page. You need to use regex to parse the text and find the URLs
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
how to convert text.table to text.pdftable in itextsharp?
|
|
|
|
|
is itextsharp a CP article ? If so, it has a forum. If not, as I suspect, you should be asking in their forums, because most people here will not have it or be using it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try searching google first and then posting here with your problem
We are not a Code Charity
|
|
|
|
|
i want to display the list in the page and it should be created when page is loading but page loads and the other parts are visible instead of the list what would be the reason
List<string> lst1 = new List<string>();
protected void Page_Load(object sender, EventArgs e)
{
lst1.Add("apple");
lst1.Add("goat");
lst1.Add("zip");
}
|
|
|
|
|
I suspect you need to buy a beginners ASP.NET book. There is absolutely no reason to expect this list to appear on the page. None.
you can add a control such as a datagrid or gridview and set it's data source to be this list, THEN you will see it's contents on the page.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
http://www.aspspider.com/tutorials/
We are not a Code Charity
|
|
|
|
|
Hi
This is urgent requirment for me.
I Have one OCX (Active Control), we need download from site and register into that system (Visitor System) through javascript.
Main Thisng is we need to register OCX control through Javascript.
Is it possible if it is please give me solution
Thx
|
|
|
|
|
vurugonda wrote: This is urgent requirment for me.
That tends to make people react slower to answering your post.
vurugonda wrote: Main Thisng is we need to register OCX control through Javascript.
http://www.daniweb.com/forums/thread90367.html
We are not a Code Charity
|
|
|
|
|
i have purchased a code signing certificate and i have signed my exe. When i access the url from my system while downloading the exe i dont get any error, but if i use the same url from some one within the intranet it throws Unknown Publisher popup..
1. Do i have to copy the cretificate on to his system also?
2. If so can we do it using a piece of code so that he need not manually install
3. or is there any other work around?
|
|
|
|
|
I have two web pages , i am navigating from page1 to page2 with a query string . The problem is i don't want to show the query string value in the address bar , it leads to database hacking.
How should i overcome this problem ?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
The simple answer is not to use query strings - they are wide open to hacking and sql injection. Use stored procedures and only pass what is absolutely necessary. Nobody should be able to see what stroed proc you are executing, so the params are meaningless.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
in the address
www.abc.com/id=1
i don't want to display id=1
in the address bar.
this leads to database hacking.
Can i do it?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Pankaj Garg wrote: www.abc.com/id=1
i don't want to display id=1
in the address bar.
this leads to database hacking
Not if you are using stored procs because:
1) www.abc.com?ggsttfgj=1 would be pretty meaningless, but your code knows that ggsttfgj is really the id
2) all you are passing is a stored proc parameter. Nobody has any idea what stored proc is going to be called
Can you hack this to get into a database?
http://www.codeproject.com/script/Forums/Edit.aspx?fid=12076&select=2590541&floc=/script/Forums/View.aspx&fa=r
Its all about relative security, and if you are not using stored procs or parametrised queries then you may as well use plain text as you are open to sql injection anyway.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Pankaj Garg wrote: i don't want to display id=1
in the address bar.
You can't avoid that unless you use cross page postbacks. But, it doesn't lead to hacking, the worst it leads to is someone wandering your DB. you should have permission layers so even if someone uses the id of another user, they won't get to the data. If you build it right, there's no reason to worry about ids on the URL, and having them there has a lot of benefits ( such as bookmarkable pages )
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
By validating querystring values. Alternatively, you can encrypt the querystring values.
|
|
|
|
|
u have any link regarding the same?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
I don't have. Validating query string values are pretty easy. Before processing make sure the values you got from querystring is valid. To prevent SQL Injection, you need to use parameterized queries instead of appending query in a string.
|
|
|
|
|
Put your variable in a session
We are not a Code Charity
|
|
|
|
|
is there any way to change the page name like
www.abc.aspx/id=2
to
www.abc.aspx/2
something like this.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|