|
Hi,
I have a textbox which gets value from a calender control.To avoid users from manually typing I have diabled the textbox,The problem is on Postback the Textbox value i.e the date value is getting cleared.
I have also tried it using Readonly Property same problem.
Can any one please give me a solution ,
Thanks is Advance.
Archana
|
|
|
|
|
I thing you have you set the autopostback property of textbox set to false
cheers
|
|
|
|
|
No ,I didnt set the Autopost back,Since Im getting the value from calender control the page is automatically getting refreshed.
|
|
|
|
|
Set the autopostback = false in aspx page check it
|
|
|
|
|
|
View state is maintaining value on postbacks. So try disabling viewstate for the textbox.
|
|
|
|
|
How did you disable this textbox? There is a reason why i ask this question. There are some differences between disabling textbox explicitly and disabling parent container control (eg: Panel or DIV).
|
|
|
|
|
This link said that ~
Question 3. Why all data from web controls within the disabled panel has been lost during the postback?
It’s pretty strange. In window-based application, we only need to disable the panel if we want to disable all controls inside this panel. But we can’t do like that in web development. ASP.NET doesn’t keep the viewstate of the controls if the panel is disabled so that all data in those controls within disabled panel will be lost during the PoskBack.
The solution for this problem is that enable or disable each each and every controls inside the disabled panel. Enable explicitly.
Scott Mitchell wrote very good article about this problem and solution in this blog.. You may check his article “Panel Weirdness” here.
|
|
|
|
|
I want to clear a session by calling an assembly, How i deduct browser close button in javascript or vb.net. When the user click on the close button of browser i want to call a method in code behind.
Thanks
Mahesh
|
|
|
|
|
Detecting browser unload event.
- Use onunload event of body tag to detect the closing of browser.
Calling Server-side function from client-side script
- Add a server-side hiddenfield to your page.
- Write the code (eg: clearing a session) in the change event of this hiddenfield.
- Grab this field and put some value to this hidden field from Javascript. As soon as the value is changed in this hiddenfield, the server-side event will be fired/invoked so that the code for clearing a session will be run.
Hope it would help.. Let me know if you are not clear.
|
|
|
|
|
Michael,
Thanks for reply. Well i write a function in javascript and call that function like that from inside the body tag onunload ="CloseBrow();" inside the CloseBrow how i detect when user click on Close button of browser, i must have to check that since page is unloaded every time when user move back and forth. I user some script inside that function "if (screenTop > 9999)" but this is working in some browser and not working in another browser.
thanks and regards
mahesh
|
|
|
|
|
Yeah. You are right..
Have you tried this?
|
|
|
|
|
Yes I tried it.
I tried this one also
if (window.event.clientX < 0 || window.event.clientY < 0)
This is working for IE in some machine and not for others.
And I place a html button runat="server" whose display style is none after check this if (window.event.clientX < 0 || window.event.clientY < 0)
i fired the button click from javascript and call a procedure in code behind, like that window.document.hidBut.click();
Pls let me know if there is another way to handle the close button of browser.
regards
mahesh
|
|
|
|
|
hi,
does anyone out there knows any website that offers tutorial on how to include map in a website.
that map could be from google map, yahoo map, msn, or anything.
thanx
|
|
|
|
|
Please Google it.
Here is "Google Maps Control for ASP.NET 2.0 - ScottGu's Blog"
Hope it helps.
|
|
|
|
|
thanx a lot!!! i really, really, really appreciate the link...
another question, if you dont mind...
do you know any other website that has free tutorial and software on creating maps..
i've googled it a lot, and i always get the same websitessss.
i'm trying to find a suitable (easy and basic) tutorials and software but cant find..
its really frustrating...
|
|
|
|
|
Hi,
I am having a dilemma on what to do. Here is my situation.
I have a website which every page will have a tree view on the left and the content on the right.
I do not want to use iFrame or Frame as when I refresh, it will bring the user back to the main page and also some browser might not support frame. Another thing is the page title on the top left corner of the browser does not change when I go to another page with a different title.
I wanted to have something like PHP's includes or something which can solve my above problem, I heard of CSS but CSS will still need me to include the tree view in every page by myself.
I need some advice on this.
Thanks in advance.
J Liang
|
|
|
|
|
If you wanna do with ASP.NET, you can use Masterpage (2.0) or base class (1.1) to achieve.
But with PHP, I would like to suggest you to read how to create Theme for Wordpress. < link >. As this forum is not for PHP, we are not able to give the exact code what you want.
|
|
|
|
|
Hi Michael,
Thanks for the reply.
Yup, I'd search around the web and found out using Masterpage too.
But I'm facing some problem, this is what I do.
I have a master page Main.master and MainPage.aspx which MainPage.aspx suppose to be in Main.master.
In MainPage.aspx, I added this
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainPage.aspx.cs" Inherits="MainPage" MasterPageFile="~/Main.master"%>
Then I added whatever interface components I want in Main.master.
But when I run it, I received this message
Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Did I missed something?
Thanks in advance.
J Liang
|
|
|
|
|
Masterpage
==========
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>
ChildPage
=========
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
|
|
|
|
|
Hi Michael,
Thanks, it works now. It was my child page's problem.
When I add new item to the project, I should select 'Select Master Page' too.
J Liang
|
|
|
|
|
Okay.. good..
|
|
|
|
|
Hi,
If you are using ASP.Net 2.0 you can use master pages to do this. A master page is a page in which the content stays the same for every page. On the masterpage itself you have a content place holder where all your other pages are comming.
|
|
|
|
|
I have been having issues with remote debugging. I have never had remote debugging working, so I am not entirely sure how it should work. Pleas help.
I run
C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\Debugger\
msvcmon -tcpip
On the remote server that has all the code including code behinds. The dll is a debug and I have the pdb up there too.
I believe I have set all the correct settings in the project configuration properties including:
Enable ASP.NET Debugging = True
Enable Remote Debugging = True
Remote Debug Machine = {the server name}
Then I run the application using a browser.
Finally, I attach the debugger by going to Tools > Debug Process and select the Transport:
TCPIP (native only) for the {server name}
at this point msvcmon says that a debugging session has been attached.
I highlight the worker process and the msvcmon says a debugging session has been attached again
Now I stick a break point on my Visual Studio code and proceed on the browser application, but the breakpoint is never reached. The application continues as if I have no breakpoints.
I get no errors.
Any ideas? HELP!
Thank you very much.
|
|
|
|
|
Anyone who can help me in creating Pop up Calendar in ASP.NET 2.0?
Thank you in advance
kidus
|
|
|
|