|
|
Sir.. I have two pages in websites. I have a label and button on first page, for 'Postbackurl ' property of button of first page ,I have taken url of second page.. & I have taken another label on second page I have added ..
<System.Web>
<sessionState Timeout="1"/>
</System.Web> into web.config file
so when i run the page ..first page will be opened ..then after 1 min I clicked on button still second page successfully opened.
and I want show by using label that..." Session is expired ".
Thanks & Regards
-Rakesh
|
|
|
|
|
|
How can we update row in database table if browser is closed using C#,ASP.NET
|
|
|
|
|
You'll need to clarify your question. If the browser is closed you can't run any web application.
No comment
|
|
|
|
|
If you are talking about recording 'close' event of a browser, its pretty involved. For eg., session, cookies, browser version, browser type etc.
I would start with 'unload' event of IE.
You can never try. You either do it or you don't.
|
|
|
|
|
You can't: once the browser closes that's it.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
You can use javascript's page unload event to run any server side code.
Hope this help you out.
|
|
|
|
|
Hi
I have fields empcode,empname,photoname,photoguid
I want to display it in gridview & want to give option to user to edit record & also if file is attached user should be able to open or delete that file & add new file to that record.
Thanx
|
|
|
|
|
Have you bothered to a) do any research or b) try something for youreslf?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I'm not a programmer, but I've managed to create our company's website in Visual Studio 2010 / VB / ASP.NET 4.0. I've also managed to use the apps_globalresources directory to add 9 languages to the website through advice in the forums. I can call these languages by clicking on a flag. I apologize for this message being lengthy, but anyone who could help would be a life-saver!
The Problem:
When I switch languages by clicking a flag, the text changes and it looks great. But the URL doesn't change. /about.aspx is still /about.aspx. It's just displaying the page using another language's resource (.resx) file.
What I've been told:
I've been told that having the same URLs for 9 different languages is bad SEO and bad web development practice. I've been told to use the "Page_Load" event to make my URLs like about.aspx?lang=nl for Dutch instead. They suggest this is better practice. I would LOVE to do this, but I'm not intelligent enough at programming to do so.
My current code:
<asp:LinkButton ID="LinkButton7" runat="server"
CommandArgument="nl" OnClick="RequestLanguageChange_Click" class="flagbutton">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/flagnl.png" tooltip="Bekijk deze website in het Nederlands" title="Bekijk deze website in het Nederlands"/>
<img class="map" src="images/flaghovernl.png" alt=""/>
</asp:LinkButton>
What I was told to do:
"Create a simple link that changes the language without a post back":
<a href="about.aspx?lang=nl">Nederelands</a>
Conclusion:
Now, I was told that with Page_Load you check to see if you find this parameter lang=el and if you find it you show this language resource, if not you show the default resource.
What does this mean? How can I implement this and where do I do so? Do I use the code-behind, or put it right on my master page? Or every page? Thank you for taking the time to read this novel, and I would sincerely appreciate any and all guidance you could offer me!
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
if (this.Request.QueryString["lang"] == "nl") DoRedirect();
Help people,so poeple can help you.
|
|
|
|
|
Hi Ali! Thank you for your response! Again, not being a programmer, and I'm not too intelligent, but would I put this in a javascript tag in the head of my page? If not, where would I put this code you offered? Thanks again!
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
add it to Page.Init handler (wait a minute, are you a VB guy ?)
use this
if Me.Request.QueryString("lang") = "nl" Then DoRedirect()
Help people,so poeple can help you.
|
|
|
|
|
Ali, I'm not a programmer at all, but my company is small and I cannot afford to hire one. So I just researched a lot on the internet and made this site in VB. I have a C# to VB converter. So I will look for the Page Init command. It's probably in my BasePage.vb file. I'm learning, though, and it's generous people like you who are helping me do this! Thanks again!
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
Ali, where would I put the code you suggested:
if Me.Request.QueryString("lang") = "nl" Then DoRedirect()
??
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
in the code behind file select in the first combo box 'Page events' and the other 'Init' then you can add my code inside the resulting function.
if you failed to do this please give me your code so i can fix it.(sennd it to ali.alomairi@hotmail.com)
Help people,so poeple can help you.
|
|
|
|
|
Hello Ali. Did you get my message? I sent it to your e-mail ....
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
yes, and i am working on it.
Help people,so poeple can help you.
|
|
|
|
|
Thank you so much, one again, for your kindness, Ali. Please take your time; without people like you, I would have never gotten this done. Almost all of my code is taken from Developing an ASP.NET page with MasterPage and Localization[^] right here in Code Project. I cannot thank you enough, and if there is ever anything I can do for you, please let me know!
Jason Weber
http://on.fb.me/JasonPWeber
|
|
|
|
|
hey guys,
I'm developing an ASP web application and i need to run it on another computer. computers are connected to the same LAN.
How can I do that?
|
|
|
|
|
ASP.NET web application are run within IIS which servers requests for resources from that web application to clients. You make a request in your web browser for the page, just like you did when posting this question. You didn't need to have Code Project installed on your machine.
No comment
|
|
|
|
|
I configured IIS 7 but still it can't run my application on a remote computer.
|
|
|
|
|
Need a lot more details. It is pretty simple. Setup a new site in IIS, then from the other computer open IE and browser to http://[servername]/[sitename]. Sounds like you might need training on IIS.
|
|
|
|
|
That's the issue, I try that path but the distant computer take time to respond then displays a timeout error, so I think it works but there is just that issue with reponse time.
|
|
|
|