|
You can't access the Session object from client script. You have to send the value to the server, so that the server code can put it in the session variable.
---
b { font-weight: normal; }
|
|
|
|
|
You may consider using AJAX to send a request to the server to persist the value in the Session object.
|
|
|
|
|
Hi,
I am Ravindra,currently doing a web application
consisting of :
1.Login.aspx
2.Mails.aspx
and other web forms
when I type the url : http\\localhost\Mails.aspx ,it is directly opening that web page
without displaying Login.aspx web page.
I want to restrict the mails.aspx page until the user logins with Login.aspx,
and also mails.aspx page is to be restricted even the user types the
url(http\\localhost\Mails.aspx)
please help me ,I am new to ASP.net.
ravindra donkada
|
|
|
|
|
Simple Forms Authentication
Basically, you need to configure forms authentication and set access rules on different pages or directories to tell the server which pages are registricted.
-- modified at 15:41 Thursday 29th June, 2006
LINK: Made link
|
|
|
|
|
Simply assign some value to a session variable in login Page say..
Session("login")="admin"
And on Mail.aspx page check
If Session("login")="" then
Response.redirect("login.aspx")
else
Your page code here
end if
Lets work it Out.........!
|
|
|
|
|
Hello,
I am using FormsAuthentication and Membership in ASP.NET 2.0 Applicaion. On Login page I have a link to page saying, Forgot password. On click of this link it should lead me to ForgotPassword.aspx page. The problem is, everytime I click on this link, system takes me back to Login page. To reach to that page I have to be logged in, which is not the requirement.
Had anyone have idea, how to mitigate this problem.
Thanks in advance.
- ashish
|
|
|
|
|
Move that page out of the protected area. Or use could use the admin tool to set the access rules on it, or you may be able to do it in Web.config in <location> tags, but I'm not sure if that will work with the Membership stuff.
|
|
|
|
|
Like eggsovereasy said, you can use the
location[^] tag to configure the authorization which allows all users to access this page. You can find the sample settings from the link.
|
|
|
|
|
I want to check whether gridview contain any row so that if grid view is empty i can print appropriate message.
Note that gridview1.rows.count doesn't work.
aLi
|
|
|
|
|
Try setting the EmptyDataText property on the gridview. It is a message to display if the gridview is empty.
|
|
|
|
|
With the GridView control, you can use EmptyDataText or EmptyDataTemplate to display your message or whatever you want when the datasource is empty.
GridView Members[^]Last modified: Thursday, June 29, 2006 10:12:40 PM --
|
|
|
|
|
I have a Content Page with a Custom Content Place holder. How do I get my functions that do various calculations in the code behind page to show up in the Custom Content Area at runtime? Thanks.
|
|
|
|
|
Perhaps, I don't undertand what you mean with your Custom Content Place holder and Custom Content Area, but basically you can place a container in the content area and in code-behind you can call your functions to populate and assign the values to the container. More details could help.
|
|
|
|
|
Hi
Can any one tell me where i can get a koool but free shoping cart in ASP.net.
Note: i am using VB.net
Thanks in advance
Lets work it Out.........!
|
|
|
|
|
|
Hi all,
Very much confuse with this.
I have a datagrid, and i am able to pass the value to javascript function through "onclick" event as below:
e.item.attributes.add("onclick","javascript:myfunction('"+value1+"');");
but, when i am trying to pass the value of the first row on datagrid through "onload" event as below:
dg.Items[0].Attributes.Add("onload","javascript:myfunction('"+value1+"');");
it's not passing the value.
I have to use onload event, so i can display default value th' javascript function.
Any help will be appreciated.
Thanks,
NIKI
|
|
|
|
|
Make sure that you run this code after the datasource is bound to the grid control. Also, you can keep using the ItemDataBound event handler, but you can detect the first row so that you only run your code with this row.
|
|
|
|
|
I am using a HttpHandler (the ASP.NET 1.1 DynamicImage control from MSDN --
http://msdn.microsoft.com/msdnmag/issues/04/04/CuttingEdge/
My project structure is like i have one project of Controls and one web application and one DAL in my project.
I have placed the DynamicImage.cs and CachedImageService.cs in the controls project.
It is mentioned in the site that a setting has to be made in web.config file also which is something like this:
"<httpHandlers>
<add verb="GET"
path="cachedimageservice.axd"
type="MsdnMag.CachedImageService,DynamicImage" />
</httpHandlers>"
But i am unable to add the same in web.config, it gives some rutime error.
The assemble name for both the files have been changed say deepak.controls
And for what is axd file used.
If anyone has any ideas I'd love to hear them.
Thanks!
Deepak Surana
|
|
|
|
|
|
thanks a ton. that link solved the problem.
|
|
|
|
|
In addition, you can also create a custom http handler in a file ending with .ashx which basically does not require you to configure in the web.config file.
|
|
|
|
|
Hello All,
I am wondering if anyone can point me in the right direction. I am trying to draw a line or possibly several lines within a div control using (x1,y1,x2,y2) points. I do not want to use VML or JavaScript, I am hoping for something native to ASP.NET.
Thanks in Advance
Brandon
|
|
|
|
|
You can generate an image on the fly using GDI+ then save that image to the server for display using a normal IMG tag
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I saw the GDI+ solution, however, the size of the div's vary and there is an image already in the div cotrol. So the only solution is to then create a transparent image with my lines on it that is dynamically generated and has a higher z-index?
brandon
|
|
|
|
|
Testing E-mail response (It doesnt seem to be working for me)...
|
|
|
|