|
I have been assigned a project that needs a treeView that shows documents listed in a grid.
Example: When a root node is selected it would show all the documents... A parent node is selected it shows all the documents listed under that parent... A child node is selected then is shows all doc under that child.
I have done extensive research on this and havne't found anything that I'm looking for.
Any help or suggestions would be great.
Thanks
Cisco2103
|
|
|
|
|
We will not do your homework. Ask specific stuff.
With such question, don't expect anything.
Look other post, and then ask appropriate question.
A HINT.
Get What Treeview has, then clear grid, and write code to add to grid.
|
|
|
|
|
i need to validate controls while updating in detailsview,
is it poss? if poss, give me your ideas.
Thanks in advance,
Priya.
|
|
|
|
|
Yes... First select the field to be validatde and go to edit template field and select Edit Template Field and Click and Drag the required validator as u like...try this.
|
|
|
|
|
Hi
Here is the situation, I have an aspx page with 10 buttons on it, when each button is clicked I load a user control using the following statement,
Me.DGPanel.Controls.Add(LoadControl("Controls/AmexUC.ascx"))
In each control there is a Label a Textbox and a Datagrid, When the contol loads to the page, Both the label and textbox display fine but there is no datagrid, Here is the code that I am using in the Page_Load of the user control
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
logPath = Request.MapPath("~\\Log\\")
dateFrom = Convert.ToDateTime(Request.QueryString("DateFrom"))
dateTo = Convert.ToDateTime(Request.QueryString("DateTo"))
AmexDataMgr.ListForCollection(dsn, uid, pwd, PriBox, SecBox, Sys, Prod, Serv, db_app, dateFrom, dateTo, "A", "A", coll, logPath)
coll = Me.LoadCollection(coll)
If Not Page.IsPostBack Then
Me.BindData()
End If
End Sub
And the code for BindData():-
Private Sub BindData()
Me.DataGridCtrl.DataSource = coll
Me.DataGridCtrl.DataBind()
End Sub
|
|
|
|
|
hi all,
here iam pasting some code....
message.Body = "Don't reply to this mail, it is automatically generated mail.Your new login password is " + newPassword ;
in the above code i used to send mail to the user a new password.
but the thing is i want to display the newpassword in BOLD characters, in user's mail
|
|
|
|
|
If you send it in html format, you can include standard HTML formatting tags.
|
|
|
|
|
No i am doing all this stuff in ASP.Net with C#
|
|
|
|
|
Yes, there is an option to specify the format of your mail, then you can include lovely text like:
.body = "<b>bold text</b>"
|
|
|
|
|
i want to make only newPassword into BOLD,
its(newPassword) a variable....
|
|
|
|
|
No offence to you, but this isn't exactly rocket science:
message.Body = "Don't reply to this mail, it is automatically generated mail.Your new login password is <b>" + newPassword + "</b>";
Don't forget to set your mail format to be HTML.
|
|
|
|
|
Thanks,
i got it...
|
|
|
|
|
bhattiprolu wrote: No i am doing all this stuff in ASP.Net with C#
Yes you are, But browsers, and email see only html tags. So when you think any kind of formating. You coud do in aspx, but since email isn't server side, you can only use HTML or plain text
|
|
|
|
|
I get the above exception on the following statement:
usrStatus=Convert.ToChar(dr["User_Status"]);
The db I'm using is MySQL. Currently the user status field is set to accept nulls. I changed to not null, but then I would get an error that says that the value is one character too long.
Any ideas how I can resolve this? thanks in advance.
|
|
|
|
|
It's because User_Status in that row is null and you can't convert nulls to other types.
What value is too long and what do you have the char set to (e.g. char(1))?
|
|
|
|
|
The field is varchar(1). When I set it to not null in the mysql db and then I try to read a char value into that field with the convert.tochar function I get this error: String must be exactly one character long
|
|
|
|
|
What kind of variable is usrStatus?
|
|
|
|
|
try putting the value in a string
<br />
string userStatus = dr["User_Status"].ToString();<br />
|
|
|
|
|
User Status in the database is a char(1). When I change it to not accept nulls I get the message that the value is too long. I am assuming that somehow MySQL sees a character in the field although there is none until I read it in with the data reader.
For now, I had to change the field in the database to a string and am reading it in as a string. Now I don't have any problems. But this solution is not ideal as I just want one character in that field. There is destined to be a user who will put more than one character in that field and right now the program allows them to.
|
|
|
|
|
Hi Everyone,
Just few minutes back i got cleared about the method DataBinder.Eval() method. But when i went through a code i came across a method Eval(string,string).
i can understand that this method is not the DataBinder.Eval(). It was used like <%#Eval("Name","~/UploadImages/") to the ImageURL property of asp:Image control.
Can anyone explain me about this method???
Thanks,
Srikanth
|
|
|
|
|
In ASP.NET 2.0, the DataBinder object that exposes the Eval() method is the default context for data binding expressions. You no longer have to explicitly refer to the object you want to evaluate.
This means that Eval() now has a much simpler syntax.
Paul
|
|
|
|
|
hai
i am an asp programmer.
i have two combo boxes optone and opttwo.
i have loaded values for optone from database
selected
<%
sqlPRO = "Select field1 From tablename"
set rs= conn.Execute(sqlPRO)
i=1
do while Not rs.EOF
%>
<%=rs("field1")%>
<%
i=i+1
rs.MoveNext
loop
rs.Close
%>
now i want to load a value for the second combobox opttwo
it's dependant on the first combobox optone
function setOptions(chosen)
{
var selbox = document.frm.opttwo;
selbox.options.length = 0;
selbox.options[selbox.options.length] = new Option('Select','oneone');
<%
strSQLQry = "Select field1 From tablename where ID='" & chosen & "'"
rs.Open strSQLQry, conn
rs.MoveFirst
While Not rs.EOF
%>
valFromList = "<%=rs("field1")%>";
selbox.options[selbox.options.length] = new Option(valFromList,'oneone');
<%
rs.MoveNext
Wend
rs.Close
%>
}
this code shows an error.i can't get the javascript variable into asp.
if anyone known please help me
Thanks and Regards
Ganesh Mohan
|
|
|
|
|
The problem is that the code is not at all executed in the order that you think it is. All ASP code is executed on the server, then the page is sent to the browser, and the client code is executed.
The ASP code that you have put inside your javascript function is always executed when the page is created, not when the javascript function runs.
To run server code that uses values from the client code, you have to send another request to the server and send the values along in the request. You can send values either in querystring or in form data.
To populate a second select box depending on the first, you can either reload the page to do the request to the server, or do the request behind the scenes using techniques like AJAX.
---
single minded; short sighted; long gone;
|
|
|
|
|
hai
thanks for the reply.
Is it possible using hidden field?
|
|
|
|
|
ganeshMohan wrote: Is it possible using hidden field?
Yes.
---
single minded; short sighted; long gone;
|
|
|
|