|
Many of the user have the same Issue with there Browser Back and Forward button.
Issue here is not the browser but your implimentation. you need to take care of logout and login functionality
1. Clear out the DataContainer or session when user says Log Off.
2. you should check for user crendetial in every page Load
Like Session or DataContainer is having the values or not if no value redirect user to Login Page.(Better way is to write this functionality in base class load function instead of every Page).
3. Now even user says log out and Click back button browser will show the page from its Cache.it is not coming from server so even if he is able to see the Page if he clicks on any server side event he is going to Login page.
Please let me know if you have impplemented then also facing some different issue ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Like Session or DataContainer is having the values or not if no value redirect user to Login Page.(Better way is to write this functionality in base class load function instead of every Page).
Wats the better way,which one u consider as a base class?
My problem is,
After login,did some operations in some page and from that page if he clicks on back(browsers)button,it will go till homepage and with FORWARD button it is just allowing to do anything where i was doing something---which is wrong.
So this user credentials,am i need to check on each page??Ya how to redirect to login page as i am not emptying session values other than logout page?
kissy
|
|
|
|
|
You can't control it as user can click any thing in its browser.
If the user is Logged in User and he clicks back button can go to any last page visited.
The main thing is that if user logged out and then click back button and if comes to any last page visited then he should not be able to do anything.
If don't want to have back functionality just disable the cache of the browser then also i don't thing it will help you.
Logged in user can navigate the website using back button you can check this here in CP just click back back you can see your last page visited and do anything as you visited it first time
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Hi,
I would like to open a crystal report in a new window by passing two query strings. The code i am using as of now is as follows,
protected void btnShowReport_Click(object sender, EventArgs e)
{
..
..
..
..
Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
}
Could anyone help me on this above issue.
Many thanks in advance.
Thanks and Regards,
Hariharan C
|
|
|
|
|
Hari_1010 wrote: Server.Transfer("ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format);
This won't open in a new window. Try the following one
string url = "ReportViewer.aspx?ReportName=" + "rptCostByTaskLevel" + "&ReportFormat=" + format;
ClientScript.RegisterClientScriptBlock(this.GetType(),"NewWindow",
string.Format("window.open (\"{0}\",\"mywindow\")",url),true);
|
|
|
|
|
Hi Navaneeth,
Thanks a lot for your kindly help. It's working fine now.
Regards,
Hariharan C
|
|
|
|
|
Hi,
I've 2 aspx pages. I have to transfer a control value from one page to other page by using server.transfer. In First.aspx page, I have one hidden field and I am setting a value into it. I have followed the following things in my 2 pages.
First.aspx
----
Server.Transfer("Second.aspx",True)
Second.aspx
------------
]]>;
strUName = Request.Form("HiddenField1")
But I did not get hidden field value into strUName. Pls help.
Balasubramanian K.
|
|
|
|
|
Make the hidden field run at server. In the second page, use "PreviousPage" property and find the control. Something like
TextBox text = this.PreviousPage.FindControl("TextBox1") as TextBox;
if (text != null)
Replace the texbox name with a valid one.
|
|
|
|
|
thanks. I got it..
Balasubramanian K.
|
|
|
|
|
i want to toggle treeview control on clicking root but not by clicking +/- images. i want to hide +/- images at all. can any body help please
|
|
|
|
|
Look at how tree view emits JS to toggle the visibility. Use the same and register it on the node's click.
|
|
|
|
|
javascript:TreeView_ToggleNode(TreeView1_Data,0,TreeView1n0,' ',TreeView1n0Nodes)
this is the javascript that is needed to do the job but how to fire this for each root node, i mean to say for each root node (hover node) i have to pass parameters and how to call this function differently for different hover nodes.
|
|
|
|
|
i did it by using SelectAction="Expand" attribute of treenode in tree view control but i could not remove +/- image which i want to remove. if i am removing it using ShowExpandCollapse="false" then root does not toggle. can u help please.
|
|
|
|
|
I am sorry, my last reply was wrong. Here is how you do that.
1 - Goto tree view properties, choose "Nodes".
2 - Choose one node, and in the properties, make "SelectAction" to "Expand".
You are done.
|
|
|
|
|
Hi, I have the complex business object like: Ownership. Ownership object is collection of buisness objects, collection of person objects.
class Ownership
{
Collection<BusinessData> Businesses;
Collection<PersonData> Persons;
}
In the ASPX.cs Page_Load I am adding the business objects to Ownership object:
OwnerShip owners = new OwnerShip();
owners.Businesses.Add(new BusinessData("XX LLC", true, 0, 20, "pres", "", true)); XX LLC is business name.
owners.Businesses.Add(new BusinessData("YY LLP", false, 0, 20, "vice president", "", true));
In ASPx page it is like this:
<asp:GridView ID="gvOwners" runat="server" AutoGenerateColumns="False" Width="787px"
OnRowDataBound="gvOwners_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:DataList ID="BusinessPersonDataList" runat="server">
<ItemTemplate>
<%# ((BusinessDescriptionData)Container.DataItem).BusinessName %>
</ItemTemplate>
</asp:DataList>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Now in the RowDatabound event of GridView, I want to bind one DataList with Business colection.(in another DataList I want to bind the Persons collection, I did not put the code for this part yet. First I am trying with the Busienss objects).
The RowDataBound event is like trhe below:
protected void gvOwners_RowDataBound(object sender, GridViewRowEventArgs e)
{
OwnerShip os = null;
GridViewRow r = e.Row;
if (r.DataItem != null) // Make sure we're not in the Header or Footer row
{
os = r.DataItem as OwnerShip;
}
DataList BPDataList = e.Row.FindControl("BusinessPersonDataList") as DataList;
if (BPDataList != null && os != null)
{
BPDataList.DataSource = os.Businesses;
BPDataList.DataBind();
}
}
When I run the page, I am not getting any results. The Gridview is not displaying anything. If I remove the RowDatabound event and in the page_load gvOwners.DataSource = owners.Businesses; I have not used the datalist in this example, just binded to one Label in Gridview. Then it is displaying the results.
I think the RowDatabound event is not firing. What is the problem in the above?
Thanks in advance.
|
|
|
|
|
You need to put break points and step into the code to know what's going wrong.
|
|
|
|
|
Hi,
Does anyone know how set the dropdown width of a HTML Select control in IE??
I want to have the dropdown width wider than the control.
It works ok in FireFox, Bill.
Malcolm
|
|
|
|
|
|
HOo does that affect the DROPDOWN WIDTH?
|
|
|
|
|
Can you post the your html code ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
<select id="Select1" style="width:120px;">
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
<option>options 1 </option>
</select>
Check this one.
Give width in pixels its working in my machine.
Any issue with this ?
if then also you have any issue
do one thing for default selected option give space in it
<option> Select One </option>
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
You do not understand
I want to set the width of the list that drops down seperately
from the width of the control
So it displays all text
|
|
|
|
|
Still not understing the issue
Do you mean that drop down is having some options whose text is more than the width of control ? beacuse of it user can't see the whole text of the list ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
|
Hi all
I have an user control where I use Slider Extender from asp.net ajax control toolkit. This Control is loaded into update panel in the aspx page. When I drag the slider sometimes I get an error "htmlfile: Unspecified error" in ScriptResource.axd. This error occurs on the line
var clientRects = element.getClientRects();
This error is not repeatative too. Sometimes this error occurs. Has anyone come across this issue ? how can I resolve this? thanks in advance
|
|
|
|