|
Are you sure that the Nodes collection contains the SelectedNode?
|
|
|
|
|
Yes.In Quick Watch I am getting the exact value of the selected node.
TreeView1.SelectedNode.
thanks .
bhavna.
|
|
|
|
|
Hi
I have an array of URLs
I wanna display them in the form of hyperlinks using StringBuilder
ie StringBuilderobject.Append("url")
i wanna convert above "url" in the form of hyperlink to be displayed in browser
How do i do
Should i use some script?
please help
Thanks
Jiny
-- modified at 5:36 Tuesday 27th June, 2006
|
|
|
|
|
Hi,
Do you have the URLs in a comma seperated string?
If yes, you can split it into a string array and then generate array of hyperlinks as much as string array lentgh of the URLs.
I hope this will help you,
If not, please explain your situation
Thanks,
Sushant Duggal.
|
|
|
|
|
My code looks something like this
foreach (ResultElement reselem in objres.resultElements)
{
//here sb is object of string builder
sb.Append("<a href="\ + reselem.URL + "\">" + reselem.title + "</a><br />");
}
TextBox1.text = sb.ToString();
Rather than displying it as hyperlink, it displaysas "a href="\......
kindly help, how can display it in the form of hyperlink
Thanks
Jiny
|
|
|
|
|
Place a repeater control on the page that contains a hyperlink control.
bind your collection - objRes.resultElements to the repeater.
In the repeater, bind the url property of the hyperlink control to the URL property and the text to the title property.
This should then display a list of all the urls.
If you are trying to display a clickable url in a textbox, then i don't think that this is possible.
|
|
|
|
|
|
I have used a web service to return a dataset and the code is as follows.
<webmethod()> Public Function getSourceData() As DataSet
Dim L_DS As DataSet
Dim L_SQL As String
L_SQL = "SELECT NAME, ADDRESS FROM TESTER"
Con_OBJ.GetDataSet(L_SQL, L_DS)
Return L_DS
-----
In my application i have used the below code
L_DSNew = New DataSet
Dim myWebService As New localhost.sourceData
L_DSNew = myWebService.getSourceData()
L_DSCurrent.Merge(L_DSNew) 'Dataset with already existing values from the table
L_DSCurrent.AcceptChanges()
L_DA.Update(L_DSCurrent) 'Dataadapter initialised with all update, insert, delete commands and relevant parameters.
But, when I queried for any changes in the dataset, it returns false and No database update happens
M Kumar
Web Application Developer
|
|
|
|
|
Is it possible to create an ASP page with an Ink feature
for example a signature field??
Thanks.
I know its possible in C# WinForms
|
|
|
|
|
Hi,
i have asked to create a user control for master page which basically parses an xml file and decides things like if the datagrid has paging or not and if the datagrid can be edited or not.
I dont have much idea as to how to start of with.Can anyone throw light on this or suggest few related links.
thnks in advance.
|
|
|
|
|
Hi all. I'm having a little trouble adjusting the functionality of the calendar control. I'm trying to convert the text of the title to a hyperlink. By the title, I mean the name of the Month that is displayed kind of like a header, at the top and positioned in the middle (ie. January 2006, February 2006, etc...). Is there anyway for me to change the behaviour so that it's linkable to another page? Thanks in advance!
|
|
|
|
|
I have a couple of questions, I am developing a small application Kiosk Style the UI will be controlled by Touch Sceen only. My question is
1. how do i make the browser full screen? No title bar, no status, I would like the only function to be those presented by the application (asp.net, C#).
2. Can I use flash to be the front end and use ASP.NET (c#) as my language? Is there a way I can send a string from flash to ASP.NET?
3. I am going to run this with stored procedures with SQL server 2000. Should my insert functions be stored procedures. there is a possibility that up to 10 stations (kiosk) could theoretically run at the exact same time.
|
|
|
|
|
Hi,
I have a datagrid, in which i want to highlight today's date row when that page is loaded.
any body have any idea?
thanks,
NIKI
|
|
|
|
|
HI,
At the time of databoud(in event ItemDataBound),
Check the date field with current date, if matches, change the backcolor of the row.
Its really easy
Thanks,
Sushant Duggal.
|
|
|
|
|
I tried that. but i think my syntax is not good. If you can guide me.And also if the current date is not in the list, it should highlight most nearest future date in the datagrid.
Thanks,
NIKI
|
|
|
|
|
HI niki,
Send me the code here, i'll try to find the error.
If you have not written the code, then i'll give u the code.
Thanks
Sushant Duggal.
|
|
|
|
|
Hi Sushant,
The code for comparing the today's date is not here, but other thing which i implemented is here.
public void dg_ItemDataBound(object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{
e.Item.Attributes.Add("onmouseover","this.style.cursor='hand'; this.style.backgroundColor='pink'; ");
e.Item.Attributes.Add("onclick","javascript:ShowDetail('"+DataBinder.Eval(e.Item.DataItem,"EVENT_DT")+"');");
ShowDetail is my js function, but it nothing to do with this issue.
the full issue is like : I need to highlight today's date if it's available in the datagrid, or nearest future date from today.
If you can send some code, that's really helpful for me.
I really appreciate your help.
Thank you very much Sushant.
NIKI
|
|
|
|
|
HI NIKI,
This is what i think u need...
Please try this code :
<br />
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)<br />
{<br />
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)<br />
{<br />
DateTime dt = Convert.ToDateTime(e.Item.Cells[5].Text);
if(DateTime.Compare(DateTime.Today, dt) == 0)
e.Item.BackColor = Color.Aqua;<br />
else if(DateTime.Compare(DateTime.Today, dt) == -1)
e.Item.BackColor = Color.Yellow; <br />
}<br />
}<br />
I hope this helps you
THanks
Sushant Duggal.
|
|
|
|
|
Hi Sushant,
Thank you very much for help.
along with your code, i am adding this two lines. if i dont have today's date or future dates in my datagrid it will highlight the latest past date in datagrid.
else if(DateTime.Compare(DateTime.Today, dt) == +1)
e.Item.BackColor = Color.red;
But, this makes backcolor red for all past dates rows instead of just a single latest past date.(I have at present, no future dates or today's date)
I want to highlight only latest past date in datagrid.
Any help??? that's really urgent.
and, adition to that, it should pass the value for that row as default to the client side javascript function when page load (this should be same for future date, today's date or latest past date).i am trying with 'onload' function, but it's not working.
Presently i m passing values on 'onclick' event, as below:
e.Item.Attributes.Add("onclick","ShowDetail('"+
DataBinder.Eval(e.Item.DataItem,"TOPIC_DATE")+"');");
any thing you can suggest, it will be very much helpful for me.
Thanks you very much again.
NIKI
|
|
|
|
|
HI Niki,
if you want to do that, then you need to add all the rows information of the datagrid in an data table.
do one thing,
create a datatable(define the datatable globally) , take two columns , one for date and one for row index.
do this in ItemDatabound event.
then where you are binding the grid, after datagrid.DataBind(), compare and change the color.
I hope you got my idea , and this idea works
Thanks
Sushant Duggal.
|
|
|
|
|
Hi Sushant,
This should not work??
if(DateTime.Compare(DateTime.Today, dt) == +1)
{
e.Item.Attributes.Add("onload","this.style.backgroundColor='red';");
I don't know, i m not sure.
Thanks,
|
|
|
|
|
hi niki,
where r u checking that it is the latest one??????
This will color all the rows.
Sushant Duggal.
|
|
|
|
|
Hi Sushant,
I have all the past values at present.
so, i want to highlight only the latest past date row.
but instead, it's highlighting all past values.
I am checking in the item_databound property.
Thanks,
NIKI
|
|
|
|
|
HI Niki,
what I wrote in the last thread was to change backcolor of one row only.
I got a new and easy Idea.
DO one thing, on the page load event, get the max date from the database, then in ItemDataBound compare that date with all the rows, which ever matches, change the backcolor of that row.
I think this is really easy
Thanks
Sushant Duggal.
|
|
|
|
|
No. I don't use datagrids.
---
b { font-weight: normal; }
|
|
|
|