|
I DID IT but there is a problem if i place an alert before this it works otherwise it donot.......... i have checked the value of scroll top changes even if i donot place alert but visualy the scroll position do not v=change
|
|
|
|
|
In my Default.aspx page i created 2 text boxes for Authentication, the user writes his username/password and clicks the login button, the login button handler authenticate the username and password then save the loged in user in the Session.Add("loginUser", userRecord); and redirect the user to Home.aspx using Response.Redirect("~/Home.aspx");. in the Page_Load even of the Home.aspx page it checks the session for the created user, if(Session["loginUser"] == null) it will redirect the user to the login page using Response.Redirect("~/Default.aspx"); otherwise it will load Home.aspx. Home.aspx has a Logout button when you click on it, it will remove the loged in user session Session.Remove("loginUser"); , then it will redirect the user to the Default.aspx. The problem occurs after signing out, when i try to visit Home.aspx by typing the URL to the browser http://localhost/ProjectName/Home.aspx, i can view the content of the page even after signing out by clicking the sign out button. this problem happens only when im using IE, Firefox will redirect me to the login page Default.aspx if i tried to visit Home.aspx after signing out!!
|
|
|
|
|
tawammar wrote: The problem occurs after signing out, when i try to visit Home.aspx by typing the URL to the browser http://localhost/ProjectName/Home.aspx, i can view the content of the page even after signing out by clicking the sign out button.
This is because the browser loads your page from the cache. You have change the Cache property of the pages.
Use Response.Cache.SetCacheability() function to set cache property. But this would reduce your application performance if you do more actions while page loading. Use it in appropriate places.
|
|
|
|
|
I'm using ASP.NET 2.0 and C#.In my website,in a certain page I want users to be able to download certain files.How can I do that?
Thank you.
|
|
|
|
|
Chakouri wrote: In my website,in a certain page I want users to be able to download certain files.How can I do that?
Put links to the files in the page.
<a href="myfile.txt">Download Myfile.txt</a>
led mike
|
|
|
|
|
In that case,users have to right click and then after clicking "save..." they will be able to download.Isn't it?
I want something like,clicking on the "Download" link/button download will start.
Thank you
|
|
|
|
|
|
I have a master page with a treeview control that binds to a sitemap for navigating. I have the following issues:
1. The treeview must be collapsed at startup
2. Only open the selected node and not all nodes when click on one node
3. I want to be able to expand/collapse nodes when I click on the node text of a node that has no url but has child nodes.
Please help
Thanx
|
|
|
|
|
Set the property ExpandDepth to 0.
Give this code in .cs file.
foreach (TreeNode tnNode in tvwTest.Nodes)<br />
{<br />
if (tnNode.ChildNodes.Count > 0)<br />
tnNode.SelectAction = TreeNodeSelectAction.Expand;<br />
}
This is for first level nodes.Otherwise u have to write recursive function.
Arun J
|
|
|
|
|
Thanx, the expand depth = 0 helps to get a collapsed menu at startup. How do I keep the selected node expanded? Where should I add the foreach loop? It has no affect when I put the code in Page_load() / tvMenu_DataBound / tvMenuNode_DataBound / tvMenu_TreeNodeExpanded.
Please help
|
|
|
|
|
hello everybody.
I have a gridview having linkbutton inside template columns
based on clicking a linkbutton some data to be fetched and to be displayed in an internal gridview(inside template field)in PopupControlExtender.
i was trying a lot but spite of existance of data,the internal gridview (inside PopupControlExtender) does not being displayed .
any help will be greate appriciatable ......
thanking u all.....
|
|
|
|
|
write a javascript function like below.
//index should be table row index.
functoin showvalues(index)
{
//read the cell content like
//tablename.rows[index].cells[hiddencolumnindex].innerText
//hidden column cell can have the values , what you want to show for this row.
show this values, whare you want.
}
call this function from linkbutton.
|
|
|
|
|
document.all.PageNumber.value = id; code working with simple test.aspx page but when I create test.aspx page with master page
not working.
Thanks.
please look on below code may be helpful to get my question.
function ChangePage(id)
{
// save the page clicked
document.all.PageNumber.value = id;
// call the __doPostBack function to post back the form and execute the PageClick event
__doPostBack('PageClick','');
}
for (int i = 1; i <= totalPages; i++)
{
if (pageNumber != i)
PagesDisplay.Text += "" + i + " ";
else
PagesDisplay.Text += "[" + i + "] ";
}
You get the best out of others when you give the best of yourself.
|
|
|
|
|
When you use MasterPages, ASP.NET will prefix container id along with this control id. Use Control.ClientId to get the id.
|
|
|
|
|
Hello...
I want to use javascript function in .Cs file. How i can call js function in c#.
Thanks in Advance....
Raj
|
|
|
|
|
Use this
ScriptManager.RegisterStartupScript(this, typeof(String), "CALL", "FunctionName();",true);
U can also use Page.Clientscript instead of scriptmanager .
Arun J
|
|
|
|
|
Which Namespace use for scriptmanager..
|
|
|
|
|
Use Page.ClientScript or ClientScriptManager instead of ScriptManager .
Arun J
|
|
|
|
|
|
You can't use a JavaScript function in C#, they are two different languages meant for two different environments.
only two letters away from being an asset
|
|
|
|
|
but we know .net works on cross platform as well also.so why we can't use]
js in C#
u can use the following code to call js in C#
ScriptManager.RegisterStartupScript(this, typeof(String), "CALL", "FunctionName();",true);
U can also use Page.Clientscript instead of scriptmanager
|
|
|
|
|
ScriptManager.RegisterStartupScript(this, typeof(String), "CALL", "FunctionName();",true);
This does not call the JavaScript function, it inserts the script into the page. RegisterStartupScript also only have three parameters, see below.
http://msdn2.microsoft.com/en-us/library/asz8zsxy.aspx[^]
only two letters away from being an asset
|
|
|
|
|
|
You're correct. I meant to say the method doesn't take five params.
Arun J wrote: But while checking MSDN check thoroughly,and after that only give comments.
Perhaps you should also check your information before replying. You were the one who originally responded that this method had five params and could be used to call JavaScript from within C#.
only two letters away from being an asset
|
|
|
|
|
I meant the code with four parameters.I didn't write that this have five parameters.That code had mistake thats right, but its only a normal posting mistake.And also as i told he can find the overloads by intellisense.As a supporter, u should be more careful than members like us while posting informations.
Arun J
|
|
|
|