|
To my best knowledge, nobody here is known to be a fortuneteller. Maybe if you provide a more detailed explanation of the problem, we might be able to help you. Where and what is the data source? what other gridview? where is the checkbox? etc...
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
My project is an e-commerce project. My gridview (id: grid1) is in the sepet.aspx web page and in every row of that gridview there is a checkbox. When I select some of that checkboxes, and clicked a next page button, I want to see that datas which are selected from grid1 in kayit.aspx web page in a new gridview (id=grid2).
I search some sites but I didn't find the exact solution.
Thanks...
|
|
|
|
|
Ok, well you need to loop through the rows of the Gridview in order to check which of the checkboxes is checked. You only need to check the rows that contain data and these are of type DataRow . Once you have the row, you would need to find the checkbox control. For this you need to use the TableCell class which will give you a cell (column) in a particular column. You need to cast the control in that cell against a CheckBox class and so you would be able to see if it is checked or not by looking in the Checked property. You get the checkbox from the list of controls and since there is usually one control per cell, it would be at index 0. For each checked checkbox, you would add the data you need in some kind of list that you would save in the session and retrieve in your next page.
Roughly speaking, the code would look like this.
foreach(GridViewRow gvr in grid1.Rows)
{
if (gvr.RowType == DataControlRowType.DataRow)
{
TableCell cell = gvr.Cells[indexOfCheckBoxControl];
CheckBox chkBx = (CheckBox)cell.Controls[0];
if (chkBx.Checked)
{
}
}
}
Check with MSDN for the correct syntax because I wrote that out of memory and I might have missed or misspelled something
Hope this helps.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Thank you Talal.
I did taht steps which you wrote above. I found the checked datas. But is there any another way to store the data except using sessions. Because with storing data to sessions I think I have to use many session id's for every row which is checked. Is there any other way to doo that and transfer it to other page.
So thanks
Tahsin
|
|
|
|
|
As far as I know, there is no other way than to use the session. You won't need to deal with session IDs. Don't forget that as soon as the you leave the page, all variables declared in that page will be lost. You can use Cache if you want but there is no guarantee how long the data will remain in the server memory before being removed. Session is, in my opinion, the best choice as the data will remain in it for as long as the session persists on the server. All you have to do is put all the data you need in a DataTable and save the datatable in the session.
On the first page, you would have something like this:
DataTable dt = new DataTable("somename");
Session["myData"] = dt;
On the second page, you would need to retrieve the data with something like this:
DataTable dt = (DataTable)Session["myData"];
Good luck
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
So thanks Talal.
Thank you very much for your helps.
Have a nice day.
Byes
|
|
|
|
|
How should I go ahead to create a dialogue from a series of emails?
My idéa was to receive an email, tag it with a uniqe id and then look for that id when receiving consecutive emails. If the id match, it's a reply to the same email.
I want the reply to be indifferent to what the user has done to the mail i.e. the user should not be able to view or tamper with the id tag.
Can I append the id to the SMTP header? Will this make it email-client-safe? How do I in that case read and write the header?
|
|
|
|
|
Hello,
Has anyone ever experienced data corruption when using the .NET 2.0 Membership API security framework and SQL Server 2000? I wrote a web app for a client that has 300 users. Most of the users are fine, but a handful are complaining that they use their account for a week or two and then "all of a sudden" their password is not valid anymore.
They also claim that when they try to use the password reset utility after their password goes bad, they get an error that their security answer (required on this system) is incorrect -- really mind boggling since I added code to make the security answer case insensitive, and they use really simple answers like "car" or "bus".
Mind you, the account I set up for myself on their live system has been perfectly intact for 10 months now. And we know that data generally doesn't magically change itself.
The first thing that comes to mind is user input error. But I've been arguing with the client for 3 weeks now, and they insist they are entering the correct password and/or security answer.
Has anyone ever experienced this phenomenon? Does anyone have any ideas?
Thanks for your help.
|
|
|
|
|
Well, just for your own sanity, I would store all log in attemps with the enter userName / password in a database. That way you can tell if they made a mistake or not.
Another good idea is to have them use their email address as the userName. This prevents people from forgetting thier username.
But I have never used the .NET 2.0 Membership API security framework, so I haven't experienced the problem.
I didn't get any requirements for the signature
|
|
|
|
|
See, you and I think too logically. That is the exact next step I recommended to my client. But of course, to make life difficult, the client doesn't want to spend any more time/money on the problem. They just want it to magically start working.
Gotta love clients!
|
|
|
|
|
We have been using the membership api for almost a year with no problems. We initially had some problems where the password was case senstive and the client was not used to that. Haven't seen any corruption. I would guess someone did an oops update in their data and doesn't want to fess up to it.
If they just want it fixed then they need to get a backup of the database restored and update the records. I would guess someone from their side messed it up.
Ben
|
|
|
|
|
HI
I have a menu control in my aspx page.all menu are coming.
But the problem is when Iclick on menu item then page is being refresh.
But I only want when user click on subitems then page must be refreshed not on items.
Can any body help me .It is very urgent.
Thanks in advance
Raghvendra Kumar Roy
|
|
|
|
|
node.SelectAction = TreeNodeSelectAction.Expand
This will expand to display submenu items but not refresh the page.
I didn't get any requirements for the signature
|
|
|
|
|
this is for treeview control. But I am talkinh about Menu Control.
Raghvendra Kumar Roy
|
|
|
|
|
Hi,
I'm using Iframe in my project. My Req/.. is : I'm having 1 drop down list in my aspx page. when I select the value that ill verified in the database and the correct value will displayed in the Iframe, and I have to edit the text and again store it in database.
How to do this?
Thanks in advance..
|
|
|
|
|
To my knowledge an Iframe is not a web control, it's a page inside a page. So basically you load an ASPX page inside an Iframe. In order to be able to show some text and edit it, you need to put it in a multiline textbox for example.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
|
Hi,
can any one say me how to include a .asp file to .aspx file....
urgent please .....
If U Get Errors U Will Learn
If U Don't Get Errors U Have Learnt
|
|
|
|
|
rename .asp to .inc and include.
|
|
|
|
|
I have a project that references a couple of old COM dlls. Every now and then I get an error message when trying to debug the project, which tells me access has been denied to one of these COM references. It seems to be entirely random. I can't identify anything that causes it, and the only fix I've found is to remove the reference, make sure any local copies of the dll are deleted and then add it again. This seems ridiculous. Anyone else experienced this, or have any idea how I can prevent it?
|
|
|
|
|
hi
i wrote the code .to show my form in diff languages when we
select drop down list...
string culture = Request.Form["DropDownList1"];
if (string.IsNullOrEmpty(culture)) culture = "Auto";
//Use this
this.UICulture = culture;
this.Culture = culture;
//OR This
if (culture != "Auto")
{
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
}
base.InitializeCulture();
but when i select any language i m getting only english....
so i hope u can solve my problem
raju
|
|
|
|
|
Setting the CurrentCulture and CurrentUICulture doesn't mean that your site will auto translate english into other languages. You have to create resources that store each language, then you need to be pulling your text from these resources.
Ben
|
|
|
|
|
ay i did it by creating resources and
calling from resources
|
|
|
|
|
Ok so assuming you did all of that correctly what string are passing into your new CultureInfo()? I believe if it can't find that resource then it will use the default culture.
Ben
|
|
|
|
|
the obj is getting particular language which im selecting
but finnaly it is displaying in english
Is there any other method u know
but not using resgen and al.exe
|
|
|
|