|
Hello every one i have Tree View .i made a comtext menu on treeview.This contextmenu Having option like Add New,Edit,Delete.i got this ,But problem is that for add,edit,delete i have to get the selected node of Treeview.i am not getting the things.Please tell me the way.
|
|
|
|
|
use the below code to get selected treeview node text or value
For Each nodes As TreeNode In TreeView1.CheckedNodes
Response.Write(nodes.Text & "--" & nodes.Value & "")
Next
The miracle is this--the more we share, the more we have.
|
|
|
|
|
I uses the following code to dynamic fill the dropdownlist and forecolor of list item is set, it show good when first time load, but the style removes when the page postback...Any suggestion?
The code i use to fill dropdownlist is following...
Try
cnn.Open()
myreader = cmd.ExecuteReader()
While myreader.Read()
lst = New ListItem(myreader.GetValue(0).ToString().Trim(), myreader.GetValue(1).ToString().Trim())
If myreader.GetValue(2).ToString().Trim() = 0 Then
lst.Attributes.Add("style", "color:Red")
Else
lst.Attributes.Add("style", "color:Green")
End If
ddl.Items.Add(lst)
End While
ddl.DataBind()
Catch ex As Exception
Throw New Exception(ex.Message)
Finally
cnn.Close()
End Try
The miracle is this--the more we share, the more we have.
|
|
|
|
|
Why dont you apply the style again...
Use
if(IsPostBack)
ddl.Style.Add(HtmlTextWriterStyle.Color,"red")
|
|
|
|
|
I applid color based on the flag if the flag value in database =0 then the item color will red and if flag value is 1 then item color will green?...
The miracle is this--the more we share, the more we have.
|
|
|
|
|
yes .. then why dont you set the Database flag again during postback, and do set style accordingly.
|
|
|
|
|
how to call a javascript function from a linkbutton which is not in grid
|
|
|
|
|
At this time, every day, a ton of questions start getting posted. Most of them make no sense.
How do you call a javascript function from a link button ? You call it. How does it matter that it's not in a grid ? What are you trying to do exactly ? What have you written and what is going wrong ?
I can't work out how your question makes sense.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
What is the problem??
use
<asp:linkbutton OnClientClick="javascript:yourfunction()" ... >
|
|
|
|
|
Thanks for ur reply. I got the solution
|
|
|
|
|
when u got the solution mark it as answer for him
|
|
|
|
|
i have a master page called master.master
and a page in a folder "MyFolder"
when i'm trying to create a webform page in that folder that inherits the master.master page it doesn't inherit anything and no errors appears
when i put the master page and the webform in the root directory it works !!
what is the problem??
thanks in advance
|
|
|
|
|
You copy the same page, or you create them at those levels ? Anything you create in the designer, uses the folders to create namespaces, perhaps it's a scoping issue ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
How do you know that it doesnt inherits anything?
Check the Page header in design view.. of the ContentPage and see if path of
MasterPageFile is proper one
|
|
|
|
|
sure i did see the design
it seems like no style sheet applied to the page but i can see the content placeholders on the page !!!
|
|
|
|
|
Try to use
../
for one folder
or try using delete privacy data in ie explorer
|
|
|
|
|
i did , it sees the master now but without style sheet applied to master !!
i can see the content placeholders with no style sheet to master
|
|
|
|
|
drag and drop the css style sheet in the head section of the page
in where u need to use
<link href="../App_Themes/Theme1/StyleSheet.css" rel="stylesheet"
for my web i used this
|
|
|
|
|
Database:Oracle
Drag and drop the gridview on ASP.NET webform.
Right clicked on gridview and selected show smart tag.
Tried to configure the database.
Tables present in the user (mentioned in connection string) are not visible in drop down.
Although working fine when I try to use Query option.
|
|
|
|
|
your best bet is to abandon all these wizards and try actual programming. That way, you have control over what is going on and can fix it easily.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
U r right. I had to ultimately switch over to manual one only.
But I saw the following loopholes in manual mode:
1. Row_updating event happens but not row_updated. same holds true for delete also.
2. Moreover, wizard helps you to generate code for update, delete, etc, but manual takes lot of time.
Plz see if you know the solution of any of the above point.
|
|
|
|
|
amittinku wrote: Row_updating event happens but not row_updated. same holds true for delete also.
I don't follow this.
amittinku wrote: Moreover, wizard helps you to generate code for update, delete, etc, but manual takes lot of time.
Any code that places the SQL in the presentation layer, is not production quality ( in fact, it's a mess ). That's one more reason to never use the wizards.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi
I am developing a web application which is an intranet site using asp.net and c# and Sqlserver2005. It holds all important data about the employees, their leaves, salary, travel expenses ........ It has session timeout (it means if the portal is idle for sometime the session gets expired). The session timeout is 20mins. Even if i increase the time it is not getting effected. Is it a good practice to remove the session timeout(the session never gets expired)
Thanks and Regards
Naina
Naina
|
|
|
|
|
nainakarri wrote: Is it a good practice to remove the session timeout
Never.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|