|
If, instead of using a click event to generate your popup, your link just brought up a popup window, a new aspx file which was self contained, then there would be no browse history on the main page which is what's causing the current problem
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a big treeview,And i need to print with all the nodes open. But
After printing the webpage i have seen that some nodes are missing at end of every page, because of lenght of the paper. I would like to know the proper way to
print huge treeview .
|
|
|
|
|
Hi
I have 2 textboxes .in first i m saving start date & in second i m saving end date.
if in first textbox i have 01/08/07 value & in 2nd textbox i have 31/08/07 .I weekly dates between these.
Can anyone help for this i want code for this in c# language syntax.
Thanks
CARECAREER
|
|
|
|
|
do you want to find how many weeks are between two dates or do you want to calculate something else bwtween two dates?
I Love SQL
|
|
|
|
|
i want to calculate weekly dates & want to save these dates in databse.
i have one dropdown in this values r daily,weekly,halfyearly,yearly.if i select weekly option &
2 textboxes r there,in 1st textbox 01/08/2007
2nd textbox 31/08/2007 values r there
then i want to show on weekly basis all dates between ist aug. to 31st aug.
Plz help me i need code in c# for this.
Thanks for replaying.
Care Career
|
|
|
|
|
Use the AddDays method on the DateTime class.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have one table
CREATE TABLE #T1(id int,Name varchar(10))
insert into #T1 (id,Name) values (1,'Haris')
insert into #T1 (id,Name) values (2,'Arshad')
CREATE TABLE #T2(id int,Reason varchar(5))
insert into #T2 (id,Reason) values (1,'X')
insert into #T2 (id,Reason) values (2,'Y')
insert into #T2 (id,Reason) values (1,'Z')
insert into #T2 (id,Reason) values (1,'X')
Now i need output like
Id Name Reason1 Reason2 Reason3 ......ReasonN
1 Haris X Z X
2 Arshad Y NULL NULL
Amit
|
|
|
|
|
I'm not sure that is possible. The best I can think of is to join to make the output like this:
Haris X
Haris Z
Haris X
Arshad Y
Once you get your data into a DataTable, you can manipulate it so that when it displays in a DataGrid it looks like the output you want. The problem is, there is no way to how many Reasons there are for each Name. So there is no way to make an output table that has an undetermined number of columns.
|
|
|
|
|
No looking for SQL Solution. I posted here becuase not got much reply from SQL forum....Thanks any way!!
|
|
|
|
|
Hi u have to make use of function returning table with in sql server where you have to pass the id.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Hi There
Do u know about DataRelation?
U can do it using datarelation
follow step
select all rows of table one and bind dataset ie. ds1
select all rows of table two with relation of table one like T1.Id=T2.Id and bind dataset ie. ds2
Now use datarelation
ie.
DataRelation dr = new DataRelation("new_relation", ds1.Tables[0].Columns[0], ds2.Tables[0].Columns[0]);<br />
ds1.Relations.Add(dr);
Make sure both ds have same column[0]
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hello,
VS 2005
I have created a web setup using deployment project for installing a web service. The setup requires that the user enters the server settings. i.e. server, user id, database, and password.
I have used the interface which has the 4 text boxes. However, there is a security risk as the text box which the user will enter the password into is always in clear text. Is there a way in which you can have the text boxes on the user interface to hide what the user is entering.
Many thanks for any suggestions,
Steve
|
|
|
|
|
Okay, here's my situation...
I have three CheckBoxList.
#1 is a list of four states. When a state is checked off, a sql query to retrieve a list of cities is generated in the control's SelectedIndexChanged method that is assigned to a SqlDataSource control's SelectCommand property.
So far so good.
However, control #2 is supposed to generate a query to fill a third CheckBoxList of stores in each city based on the cities the user checks. What happens is control #1's SelectedIndexChanged method fires on the post back when an item is checked in control #2. I tried handling this by checking the query generated by control #1 against the query in the SqlDataSource bound to control #2, however the datasource resets back to its original query created at design time. The EnableViewState property is set to true so I can't figure out why this is happening. I was also thinking that I could check the "object sender" parameter passed to the SelectedIndexChanged method of control #1 but that seems to indicate that control #1 is what is causing the post back rather than control #2.
Another weird (to my Windows Forms based mind) is that when an item is selected in control #1, control #2's SelectedIndexChanged method isn't fired.
Both control #1 and control #2 are set to AutoPostBack and are identical except for formatting stuff and the fact that they are bound to different SqlDataSources.
control #3 doesn't post back, however just for the heck of it I set AutoPostBack to true. When an item is selected in control #3, control #1's SelectedIndexChanged method fires but again control #2's doesn't. Again, this is really weird because for the most part the controls are identical.
Help, my brain is melting! :v)
EDIT: I don't know if it makes a difference but control #1's values are hard coded so it isn't bound to a SqlDataSource
-- modified at 12:29 Wednesday 8th August, 2007
|
|
|
|
|
Hi all,
How can I refer to my HTML controls declared within <asp:content> tag in javascript?
document.frmMain.txtName does not work.
Any highlights!!
|
|
|
|
|
Does document.getElementsByTagName["txtName"] return as object?
|
|
|
|
|
Yes, document.getElementByID("txtName") also returns the object.
I have my controls declared in <asp:content> tag. Does it have anything to do with that? I remove <asp:content> and put controls in body tag document.frmMain.txtName works.
|
|
|
|
|
Hello, I want to transfer data, which is selected from a checkbox, to the other gridview which is in other web page. Can u help me???
Thanks...
Tahsin
|
|
|
|
|
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.
|
|
|
|