|
Make both the divs runat='server' and assign them some ID
and write your code according to that.
e.g. on Page_Load if u want to both the divs invisible then :
div1.Visible= false;
div2.Visible= false;
Similarly you can write code according to the radio button selection.
Happy Coding,
Vivek Rathore
|
|
|
|
|
Hi,
Please help me with your ideas for the following
1.Does .net support for WEBDAV protocol?
2.Can I implement .net remoting using WEBDAV protocol?
Right now I implemented .net remoting using TCP/IP protocol.It is working fine.I need to change this to support the WEBDAV protocol.
Please help me.
|
|
|
|
|
Don't crosspost. See the answers in the C# forum...
|
|
|
|
|
Hi,
Public MasterDispDt As String
Public Sub ExFunction()
MasterDispDt = DtlsDs.Tables("DtlsTab").Rows(r).Item("DispDate").ToString
End Sub
TxtDispDate is a Textbox, Calender Selected value assigned to it.
Dim TDate As Date = CDate(Trim(txtDespDate.Text))
Dim MDate As Date = CDate(Trim(MasterDispDt))
If TDate < MDate Then
'Some Code
Endif
TxtDispDate I selected as '28-04-2009'
The above Code giving Error :
Error : Conversion from string "28-04-2009" to type 'Date' is not valid.
Pl. Help me out
Ramesh Sambari
|
|
|
|
|
this problem can be beacuase of date format.
try other formats like "MM/dd/yyyy" and apply break and check the result.
|
|
|
|
|
Hi,
When I run from Source Code, there is no problem. it is working fine. Even i run without debugging, that time also its fine. When I publish it to a folder and open , then the problem is coming.
Ramesh Sambari
|
|
|
|
|
While u r converting it to date format just specify the format like it is shortdate string or whatever u like, to all date controls and variable.
|
|
|
|
|
To convert a string to date, the date format should be MM/DD/YYYY OR MM/DD/YY.
The date "28-04-2009" is in the format dd-mm-yyyy.
This is the reason for the error.
Convert the string to correct format and your will get the result.
|
|
|
|
|
I used p/invoke but i need to add the reference of the dll in the project which is not possible the normal way i.e through Add reference in the solution explorer.
But wen i manually copy-paste it into the website cache(run->%windir%\Microsoft.Net\Framework or C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727\Temporary ASP.NET Files), it works.
I want to avoid this manual copy-paste and want to map this dll into the project.
How do i do it?
Thanks in advance
|
|
|
|
|
Add the dll with "Add Existing item"-command within VS IDE. This will put the file to your ASP project.
|
|
|
|
|
i tried that too but the dll was not detected till i copy-pasted it in the temp asp folder iv mentioned earlier
|
|
|
|
|
If its used to give a tool reference to your project,why shouldnt you try browsing of dll by this:
1.go to toolbox,
2.right click on any of them,as suited to you,
3.click the choose items button which is used to inherits the com object,
4.browse the dll,
5.ok its done u can use it directly from toolbox now.
|
|
|
|
|
what you said will work only if the dll is a Microsoft.NET dll wont work in my case where it is a borland C++ dll
|
|
|
|
|
And one thing dont ask a question again n again
|
|
|
|
|
sorry abt that but wanted the Q to be answered asap..
|
|
|
|
|
|
if you explain more we can help more
|
|
|
|
|
How can I LogOut when browser is closed?
Best Regards...
|
|
|
|
|
dataminers wrote: How can I LogOut when browser is closed?
what kind of logout are you performing ? Do want to close the session when browser is closed ? or you are maintain user logs in the database and you want to remove if user close the browser?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I want to Application.Remove(..USER_ID..) and Session.Remove()
|
|
|
|
|
I want to Application.Remove(..USER_ID..) and Session.Remove()
Do you have any idea ???
|
|
|
|
|
When browser is closed the session get expired by itself.
|
|
|
|
|
My login method like this;
--------------------------
MyGlobalVariableClass gVars = new MyGlobalVariableClass();
gVars.UserID = txtUsername.Text;
gVars.IPaddress = Request.UserHostAddress;
gVars.HostName = System.Net.Dns.GetHostByAddress(Request.UserHostAddress).HostName;
Application.Add(gVars.UserID, gVars.IPaddress + "|" + gVars.HostName);
Session.Add("gVars", gVars);
Session["Authenticated"] = "true";
I CHECK USER BEFORE LOGIN WITH "isAlreadyLogged" FUNCTION
----------------------------------------------------------
protected bool isAlreadyLogged(ref MyGlobalVariableClass gv)
{
if (Application[gv.UserID] == null)
return false; // not logged yet
if (Application[gv.UserID].ToString() == (gv.IPaddress + "|" + gv.HostName))
return false; // already logged but from the same place
return true; // already logged from different place
}
My logout method like this;
---------------------------
MyGlobalVariableClass gv = (MyGlobalVariableClass)Session["gVars"];
Application.Remove(((MyGlobalVariableClass)Session["gVars"]).UserID);
Session.Remove("gVars");
|
|
|
|
|
Even ur code has nothing like that. Session and application are removed by themselves when the browser is closed.
Dont worry.
|
|
|
|
|
For Example;
If I log in localhost in 198.168.1.100 IP, and close browser without logout.
I can not log in another pc, http://192.168.1.100/MyApplication
|
|
|
|