|
i am using ASP.NET and C#
|
|
|
|
|
I'll try to make this as simple as possible, it's just to give you some idea...
Table "TreeItems":
item_id, item_parent, item_caption, item_url
Main Code:
[Run Query] SELECT * FROM TreeItems WHERE IsNull(item_parent) OR IsEmpty(item_parent)
[Loop ResultSet]
[Create Parent Node]
RecursiveScan(thisnode, item_id);
[Add Parent Node to Treeview]
[End Loop ResultSet]
RecursiveScan (Parent_Node, ParentId)
{
[Run Query] SELECT * FROM TreeItems WHERE item_parent = @ParentId
[Loop ResultSet]
[Create Child Node]
RecursiveAddNodes(thisnode, item_id);
[Add Child Node to Parent]
[End Loop ResultSet]
}
of course you will have to adapt to your custom table settings and to the treeview control you are using, I've never used microsoft web controls before.
|
|
|
|
|
Sir,
There is a button in the form and the focus is already set on the button.There are few lines of code written on button click.Now the problem is if u press the enter key I don't want to execute the code written on button click.
Please help.
Thanks
|
|
|
|
|
Sir,
How can i delete the history programically in vb.net 1.1.
please help.
|
|
|
|
|
plzzzzzzzzzz help me
In my project nearly 10 to 12 datagrids are there
in datagrid Serial Number binding from the database
based on serial number i have delete the row
suppose there are 5 records if i delete the 3 record the 4th record should swap to 3rd and 5th record to 4th it should update in the database if u know the solution plz help me in swaaping the records in datagrid and database
shivamala
-- modified at 7:31 Monday 9th October, 2006
|
|
|
|
|
Can you explain your question?
Sathik
|
|
|
|
|
i hav to develop a web appliction thn i want to store DataBase in Sql Server2005. in this task i stored DataBase sucessfully.now i want to create a Xml file abut the entered records and whn it'll created thn i want to link this XML into my html pages and show the database value in html page.so wat can i do for tht particular task in asp.net2005. if someone help into this particular thn send me.bcoz if i'll get it thn my project is too much complete.
thnx
smile a lots its costs nothing so keep smiling.
deepak
|
|
|
|
|
In ASP.NET 1.1. I am having a template checkbox column in a dynamically created datagrid. Inorder to maintain the viewstate, i initialize the datagrid in Page_Init itself and modify the datagrid through Ajax Function. The Ajax function will modify the enabled property of checkboxes. After AJAX method is invoked, in next Postback, i'm able to get the checked property of checkbox from Viewstate but not able to get the enabled property from viewstate. But if i don't perform Ajax Modification, in postback i'm able to get both enabled and checked property.
Kindly provide any idea regarding why enabled property is not in viewstate after using AJAX Function
Maha
-- modified at 7:15 Monday 9th October, 2006
|
|
|
|
|
Hi,
I know of three ways to inject some strings into an aspx:
- <%= which is the old ASP way
- <%# which is used in databinding expressions
- <%$ which can be used to evaluate certain expressions such as AppSettings:MySettings or ConnectionStrings:MyConnectionString (assuming that MySettings and MyConnectionString are defined in web.config in the appropriate sections).
So, are there any more? I'm trying to inject the value of a const variable into the DataNavigateUrlFormatString property of an HyperLinkColumn, if I use <%# it complains that the template doesn't support DataBinding, if I use <%= it just gets rendered as is (i.e. the name of the constant, not the value of it), and if I use <%$ it complains that the constant is not on the form "Expression:Value" (and I REALLY don't want to write a custom Expression builder for injecting a single constant into an aspx page...).
What am I missing? Any help would be very much appreciated
Regards,
Daniel
|
|
|
|
|
Hi Everyone,
I am doing an web application. Here I need some help. I am not able to swap two rows in a grid.
I have done for a table. In web application for a grid it is difficult for me.Help from anyone is appreciated.
Thanks in advance.
Thanks and Regards,
Libran
|
|
|
|
|
Problem with Context User when I authenticate users in the same thread of a process
Hi, I hope you can help me with this problem, (in spite of my english!
I use CustomIdentity to authenticate the users in my webapp and read some information (Language, ID....) of the context user. It works fine if users use different browser instances for access the webapp, but if they use different threads of the same process, context user of these threads are mixed.
Some example
1) Alice opens iexplorer and connect to the webapp. She authenticates herself with her user 'UserAlice' and goes into. At this moment exist one process (iexplorer.exe) running
2) Alice open another iexplorer and connect to the webapp. She authenticates herself with another user that she managed 'UserAlice2' and goes into. At this moment exists two process (iexplorer.exe of step 1 and this one). These users can works fine at the same time
3) Alice uses 'open new window' command from the browser that she opened at step 2. (At this moment exist two process, not three) If she connect to the webapp and authenticates herself with another user that she managed 'UserAlice3' , the context user of the step 2 will be replaced for this user, and, in spite of the tree users connected (UserAlice,UserAlice2 and UserAlice3) at the tree different window browser, we have only two users (UserAlice on the first window and UserAlice2 at the others)
I need that people can manage diferent users on the same machine, but I can't control that they use new browsers spite of 'new window' commands. Besides, I need that they connect to the webapp from a link in a mail, and this action causes always that iexplorer starts a new thread, not a new process....
I use this code to authenticate users:
CustomIdentity userIdentity = new CustomIdentity(user.Name, 1, true, false, student.Surname + " " + student.Name, student.Email, user.Language, "");<br />
ArrayList roles = User.GetRoles();<br />
CustomPrincipal principal = new CustomPrincipal(userIdentity, roles);<br />
Context.User = principal;
Thanks in advance, any help would be appreciated
|
|
|
|
|
Hi, I am Ravindra.Currently learning ASP.net.
In my project I came across to develop a Registration form, It contains two textboxes:
one for :To enter Email addr,
other to: confirm the Email addr.
I want to make the First textBox property to set in such a way that it does not allow "the user to copy the entered email address (ie in textBox1)to another textbox(textBox2)".
If anybody know please help................
Ravindra
|
|
|
|
|
First I have to say that don't really see any reason for this. The double entering of values is a service to the user to help verify that the data is correctly entered. If the users don't want this help, they can circumvent it on their own risk. It might feel awkward for the user to enter the same data twice, but it's all for their benefit. If you try to force them to use this feature, it will feel even more awkward. I think that it's more effective to try to educate the users of the reason for this feature, instead of forcing it upon them.
It might be possible to prohibit copying and pasting, but it's not that easy to make it work in all browsers, as it's not really a browser function but rather a system function. There is no simple setting that allows you to control copying and pasting in a field.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
The following error was encountered when i tried to retrieve a Class file of c# in One namespace(of the same Solution) from the UI Webform of different Namespace(Of the same Solution).Thats retrieving data to UI from the DataAccess Layer.
"Could not load type App1.Web1.DAProg1.Class1 from assembly DAProg1, Version=1.0.2460.20572, Culture=neutral, PublicKeyToken=null.
"
What is this error and how can i rectify it?
Kindly help me
-- modified at 5:01 Monday 9th October, 2006
|
|
|
|
|
import the namespace which you are using and use the class in that namespace. let me know the result please.
Sathik
|
|
|
|
|
HI
How can i calculate datagrid Row
I want calculate the total row of a datagrid
EX :
------
----------------------------
ID Name Marks
----------------------------
1 aaa 200
2 bbb 250
3 ccc 200
----------------------------
Total 650
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
you can get it with items.count
Best Regards,
Apurva Kaushal
|
|
|
|
|
HI
I want to calculate the ROW items Total in Datagrid
Itiems
-------
10
20
30
-------------
Total = 60
---------------
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Ohh I actually misunderstood your question. For this you can take a label control in the footer of the datagrid to display the total and to calculate the total you can use the Onitemdatabound event there you can take a variable and keep adding all the corresponding values of all the rows.
Best Regards,
Apurva Kaushal
|
|
|
|
|
int j=0;<br />
int RowCount=myDataSet.Tables["tablename"].Rows.Count;<br />
for(int i=0;i<RowCount;i++)<br />
j += Convert.ToInt32(DgDiscovered[i,1].ToString());<br />
textBox1.Text=j.ToString();<br />
Where the mydataset is the datasource of data grid and "tablename" is the data member of the datagrid.
Sathik
|
|
|
|
|
Hi Thx For reply
I am using VB.NET Can U plz CHK Is it right
--------------------------
Dim j As Integer = 0
Dim RowCount As Integer = dsCustomers.Tables("Tottime").Rows.Count
Dim i As Integer
Dim DgDiscovered
While i
j += Convert.ToInt32(DgDiscovered(i, 1).ToString()) '
End While
rc.Text = j.ToString()
-----------------------------------------
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi Friends,
I am having 2 submit buttons on one page. One is to search and other is for newsletter subscription.
When i add text to search textbox and press enter, it validates the other text box which is to enter emailID for the subscription button.
I am not using the .NET validators. I am using my own javascript file.
I tried to check the enter keycode for search textbox and then make the search button click in the javascript, but still the validator fires and then the search button clicks.
Please Help.
Sushant Duggal.
|
|
|
|
|
you have to write a javascript function which will trap the enter key and then envoke the button which you want to.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
I already did that
function gotoSearch()
{
if(event.keyCode == 13)
{
document.getElementById('btnSearch').click();
return false;
}
}
It validates the other textbox validation, and then fires the btnsearch click event.
Sushant Duggal.
|
|
|
|
|
Are you getting inside this function? Put a alert and check whether this function is getting called correctly or not.
Best Regards,
Apurva Kaushal
|
|
|
|