|
Yes u can got one link try it:
http://forums.asp.net/thread/298129.aspx
Hope it helps u...
|
|
|
|
|
Hello Sir,
Thanks for ur help, but that artical does't fullfill my need.
Actually the only proble i m facing in fatching data from second table as I m using category Id of first table to get data from secong table.
but i m unable to do so.
Regards
rahul saini
|
|
|
|
|
Hi
You can have datalist inside datalist.
Add an ItemDataBound event for the first datalist.
Add proper event for the first datalist with proper arguments.
This event will automatically be fired when you are binding data at run time.
Go to code behind file, you have to add some code to fetch Category ID (that is from the first datalist).
If you are displaying Category ID in the first column of DataList. Then you can use 'e.Item.Cells[0].text' and the sub category can be fetched based on this category ID. Hope you are returning dataset from the database. Bind it for the second datalist using that dataset.
Or, if you are using a hidden variable to store Category ID then use FindControl() method.
Hope this is clear.
Harini
|
|
|
|
|
Hello Harini,
Thanks for your sollution.
I had fetch the categoryId from first datalist
and stored in an hidden label
and also i am able to find that categoryId using FindControl() but
when i am unable to run select command for each categoryId
when program is run it shows the last category record to all the categories.
i m using this :
protected void Page_Load(object sender, EventArgs e)
{
Label lblCategoryId = new Label();
foreach (DataListItem dataitem in categoryListDL.Items)
{
lblCategoryId = (Label)dataitem.FindControl("lbl_hidden_category_id");
string subCategoryQuery = "SELECT * FROM subCategory WHERE categoryId ='" + lblCategoryId.text + "'";
subCategoryDS.SelectCommand = subCategoryQuery;
}
}
one more thing i m using datasource for fetching data from data base.
Regards
Rahul
rahul saini
|
|
|
|
|
Hi,
Could anybody explain me the difference between Finalizer and destructor methods?
Both are called implicitly.
When and Which method is called?
Thnak YOu,
-Saranya
|
|
|
|
|
Hi All,
I need to put reminders on my Web base Project. The requirment is if certain user doesn't logon the sie the it should send a mail to admin user.
Please help me...
Thanks in advance...
|
|
|
|
|
i need the code for the web poll.i have created a web from where on button clickthe results r displayed.i have to calculate the percentage of the persons voted
thanks in advance
|
|
|
|
|
Hi,
We are not here to write code for you but give you a general idea,
try the follwoing,
- You should have a DB in which when a person votes, the count is updated for respective question/option (against which he voted)
- Consider the example, Two option are there 1. Pakistan, 2. India....Now 'Mubashir voted for Pakistan' and 'Sridevi voted for India'. Now it is faily easy to calculate the avg like VotePostedForOption/TotalVotes * 100
So avg for Pakistan wud be 1/2*100 and same is for India
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
hey, we are not here to do your work.
As above said that is a good example try with the help as he said.
If you got any errors tell us we are here to solve the problem.
Regards,
Satips.
|
|
|
|
|
i need the code for the web poll.i have created a web from where on button clickthe results r displayed.
|
|
|
|
|
you dont need to repost VISIT THIS[^]
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
One post is enough.
Regards,
Satips.
|
|
|
|
|
hello,
I want to sort the result of the search result according to the descending order of number of matching words in entered text and the particular record in a database.
thank you.
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Hi,
If you can use stored procedure this way is a good sulotion
CREATE PROCEDURE Search_ALLV
-- Add the parameters for the stored procedure here
(@SearchP nvarchar(50),
AS
BEGIN
SET NOCOUNT ON;
BEGIN TRY
SELECT @SearchP = '%' + RTRIM(@SearchP) + '%'
SELECT Title,Advisor,PhysicalProgress,RialProgress,Photo1,Photo2
FROM ALLV_View
WHERE Advisor LIKE @SearchP
ORDER BY Advisor
END TRY
BEGIN CATCH
SELECT ERROR_PROCEDURE() AS ErrorProcedure;
END CATCH
END
you can call this procedure by the words in entered text as an Argument
GO
|
|
|
|
|
Hey,
I want to retrieve all the user names(Employee names) from the active directory(network ).
I don't want to show the groups just want to show all the users(employees) from the active directory.
If anybody knows the answer pls help me .
Thanks
Kusuma
-- modified at 5:00 Friday 6th April, 2007
|
|
|
|
|
|
Hey Narendra,
I used that code which you sent but i can see only few users but not all.
Actually the company is having around 5000 users but i am can retrieve only 1000 users .I don't know the reason for this.
Is it coz of filter criteria or i don't have permission too view all the users that i don't know?
If you know the answer pls reply.
Anyway Thanks for ur reply .
Kusuma
|
|
|
|
|
Hi frd's!,
I want 2 start a "FORUM WEBSITE",
From where to start the project & also advise with it contents(i had default requirements,hope you give some new topics).
Firstly, from where i hav to start the project.
This is my first project.
Am started with documentation(Like the website introduction,its advantage's- wht are topics required & its benefits,then after wht i have 2?)
So, Wht U people suggest ME?
Waiting in anticipation 4 ur invaluable Suggestions................
Thank U
Urs Suave_Shiva
|
|
|
|
|
Hi friends..Good morning...
I want to make mysite.com/index.aspx as my home page in my browser..
..for example..In Google ..u can find a link as "Make google as your home page"..How to do this?
|
|
|
|
|
Hi,
Try the follwong javascript...
<a href="#" onclick="this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http://YourWebsite.com/index.aspx');">Set as Homepage</a>
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
Thanks..its working... and ur great...like me;)
|
|
|
|
|
what is website for convert javascript to vbscript?
-- modified at 2:26 Friday 6th April, 2007
|
|
|
|
|
I have a datagrid with with a button column and a few databound columns. The button column when clicked shows more details for a given row.
ex)
123 ABC Company View Records
123 being a unique ID. ABC Company being a description. View Records is the button.
When I added sorting to the headers, the application would direct me to the View Records code when clicking on the header to sort. I just wanted to sort.
I found the reason. The InitializeComponent() was using an ItemCommand for the View Records button which is executed when any button on the grid is clicked. The headers for sorting were using the SortCommand for a datagrid. When I allowed sorting of the headers, I suspect .NET turned those headers into buttons.
Is there anyway around this? I would like to keep my View Records button within the datagrid. I tried changing the View Records button into a hyperlink, but then I got an error for not having a correct datasource for the datagrid. I don't want to mess with the datasource select that is too much change.
|
|
|
|
|
In itemcommand event handler add a check on top if arguments.commandName != "sort". Moreover the button columns have the commandname property, so you can set different command name for buttons (if you have multiple buttons in one row) and in itemcommand event handler check the command name and act accordingly.
-----
|
|
|
|
|
Thanks.
However, please bare with me. The headers sorting uses the SortCommand which has a different set of arguments, so I can't use the same itemcommand event handler.
ex)
ItemCommand Arguments
(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
SortCommand Arguments
(object source, System.Web.UI.WebControls.DataGridSortCommandEventArgs e)
If I were to use ItemCommands arugments to do the if check, I would not have the correct SortCommand arguments to do a sort. If the sortcommand used the same parameters as the itemcommand, I could do the if statement because the sorted headers and buttons would all go to the same event handler.
|
|
|
|