|
I need to return on the page from which I had navigated to the current page.in some conditions the page i have to return is the third or fourth previous page. is their any code to remember the sequance of pages.
I need it plz
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
Use a generic list object, adding each new page to it, and then storing it in the session object. You can then iterate down the list seeing all the pages visited to get to the current page.
Regards
Angel
*********************************************
|
|
|
|
|
No need to maintain a collection, one is alreay present. History
only two letters away from being an asset
|
|
|
|
|
Use the Javascript history object in the browser.
history.back(1) or history.back(3)
only two letters away from being an asset
|
|
|
|
|
Hi,
I have written a loop which iterates through all the directories and gives a list of files whose filenames contain a specific search word that has been specified by the user on GUI.
Now I need to display this file list with a hyperlink for each item, so that user can directly click that link and the file associated with that item will open.
How do I do that ?
Pls guide me
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
How about iterating through the array and creating hyperlinks for each file? One thing to consider is the files are going to be on the server, the user is on a client machine. The list might have drive letters in the path, ie c:\\myshare\\myfile.txt whereas the user would really want to see these as \\server\myshare\myfile.txt .
<br />
<br />
Array<string> mylistofFiles<br />
<br />
<br />
foreach( string myFile in mylistofFiles )<br />
{<br />
HyperLink lnk = new HyperLink();<br />
lnk.Text = "Click to view " + myFile;<br />
lnk.NavigateUrl = myFile;<br />
yourForm.Controls.Add( lnk );<br />
}<br />
This is from memory, and really a 'concept', not a concrete solution. If the file extension is registered on the users system, the correct app will open it for viewing.
Regards
Angel
*********************************************
|
|
|
|
|
Hi,
Thanks for replying. I tried using the above mentioned solution. Worked perfectly fine as far as creating the Hyperlnk is concerned. But the problem here is that when I click on the hyperlink, nothing happens.
What should I do for that.
Thanks a lot for responding quickly.
Best regards
Omkar
|
|
|
|
|
Handle the event and open the file that was clicked.
only two letters away from being an asset
|
|
|
|
|
Can U elaborate a little using some code.. Didn't get you. How do you handle an event of a control that you are generating dynamically ??
Pls clarify.
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
Control.Event += new EventHandler( MyEventHandler )
only two letters away from being an asset
|
|
|
|
|
i have a requirement like this. i have a wizard control in that i have taken 10 steps, what i have is in step3 i place a radiobutton with yes or no options. when i click yes then i have to activate the next button else i need to deactive the button. how to do this task please help its very urgent.
thank you in advance
praveen kumar reddy
|
|
|
|
|
Here, you might use javascript to enable/disable the Next button, you can do that by registering your script with the client side onclick event of the radiobutton.
|
|
|
|
|
Hi,
I have a datagrid That Updates, it contains many names so I
created a textBox and Button on the webform that if the user wants to edit he should Writes the name in the textbox and on the pressing button the Row is selected automatically and the editing process can be done. Is this possible and if so can some one help me out and tell me how to go about it?
Thanks
|
|
|
|
|
You can hook the Click event of the datagrid control at the server side, and try to access the selected row of the control to edit.
Also, the title is "Search Button", but what you said is all about updating.
|
|
|
|
|
Thanks a lot,
What I was trying to say is that The datagrid updates very well, the text box and button I created them separetly not on the datagrid so that when the user writes the id the row that corresponds with the id in the textbox would be selected. I tryed this but it's not working do you think I'm on the write truck.
private void bttok_click(object sender, System.EventArgs e)
{
SqlCommand myCommand = new SqlCommand("select * from employee where txtname.text=id",con);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds);
con.Open();
myCommand.ExecuteNonQuery();
datagrid1.DataSource=ds;
datagrid1.DataBind();
con.Close();
}
Thanks.
|
|
|
|
|
Hi,
I am trying to store a record. It is saying that the form is invalid. I have several field validators. I would like to know if there is something i can type in the debugging tool to find out exactly which validator it is. Is there an easy way to do this, or do i have to go through ALL my validators on the page??
Thank you.
|
|
|
|
|
Are you not display the error message why the validator failed? Its always better you give proper error messages, that would be helpful to you (debugging) as well as the users.
Thanks
Its not so easy to do... So are you here!
|
|
|
|
|
When I debug it, I discover that the validation is False. The vaidation should be true.
My question is:
If I have 100 validators, instead of going through each one, is it possible to pinpoint which one is causing the problem?
Do not worry about my code. I only want to know the answer to the above question. And if there is a way to pinpoint which validator is causing the problem, please help me discover how to do so.
Thank you.
|
|
|
|
|
You can loop through all ur validators control and check for each one if it's valid or not.
Best Regards,
Haissam Abdul Malak
My Blog
|
|
|
|
|
Sorry I forgot to mention that it was client side validation. When I debug, I check "Me.IsValid"
I cannot loop through the fields because the fields are validation on the client side.
|
|
|
|
|
I found what the problem was.
My application was reloading the page which meant that a few other subroutines were being run before the "Save" subroutine. One of those subroutines was clearing all the the fields which meant that required fields were empty before the record is stored. Hence Me.IsValid was False.
Thank you for your replies.
|
|
|
|
|
How can I programmatically change ASP.NET State Service startup type and also start it?
|
|
|
|
|
If this is a windows service, you should be able to maintain this using services.msc console.
- ashish
|
|
|
|
|
Hi there:
Basically, you can start a service thru command line...something like this "net start <<service>>...". So you just find the syntax of command line to start asp.net state with your onw configurations...
<< >>
|
|
|
|
|
What I mean is, I just need to change ASP.NET State Service startup type and start it from a VB.NET application. It would help if you could paste some code to illustrate.
|
|
|
|