|
You have to use Templates to do it
|
|
|
|
|
can you say me that how to add dinamic textbox to templatefield
We Can Do Anything, If We Want It
|
|
|
|
|
|
hi,
I have a problem reading DateTime.Now in my web application on Windows vista. It's read in an incorrect format (dd/mm/yyy), although my regional settings are all (united states) and the date format is set to (mm/dd/yyyy)?
so why is it read in this format in internet explorer? Am I missing something...I'm new to windows vista so I dunno!
|
|
|
|
|
Then forcefuly Format the date
DateTime dt = DateTime.Now();
String date = dt.Month + "/" + dt.Day + "/" + dt.Year;
I Think there are also better Solution.
Ps. Is your computer also a testing server? That setting depends on the server computer, where these files are executed. This kind of problem is very often to come by when attempting to insert into mysql or other database. I Don't know if i typed it correctly the example, but at least you get the idea how to solve. Without having to change the setting for every server you inted to run it
Edit: This problem doesn't exsist in Vista Only, It coud also exsist in other platforms. (I Had same problem with PHP on Linux - When i tried linux)
|
|
|
|
|
well I can't use this solution coz the whole project is written like that..in several other pages..it's actually working ok on windows xp and I even made the same settings I have on windows vista..I hope there's something else to do in the settings of vista to solve this problem!
thnx anyway for the reply
|
|
|
|
|
Did you check on Windops Vista date format setting?
Maybe it is diffrent format, than xp Even if you selected US, Try manualy edit date format
|
|
|
|
|
Nada Adel wrote: on Windows vista
Your Computer's Regional Settings has an upper hand. You can force a DateTime's IformatProvider right?
|
|
|
|
|
try this
System.DateTime.Now.ToString("MM/dd/yyyy");
ToString() is overrriden in DateTime Class so u can manage the Format by using the above method.
|
|
|
|
|
ASP.NET does not run under the account you are currently logged in as. It runs under the .NET account. You can check the short date format for all of your acounts in the registry editor by looking at 'HKEY_USERS > [USER] > Control Panel > International > sShortDate' for each user account.
|
|
|
|
|
thank you, i think that's what I was looking for
|
|
|
|
|
i cant run my program, there's an error:
Type 'BOOK_Locator.Dataset1' is not declared
in codes:
Friend WithEvents DataSet11 As BOOK_LOCATOR.DataSet1
i have connected my database in connection wizard properly but why there's an error in it? how can i fix?
|
|
|
|
|
Don't put a useless subject like "please help me". Almost every thread here is about someone needing help, so it doesn't do anything at all to distinguish the thread from others.
Don't repost the same question. Especially not so soon after the previos one.
---
single minded; short sighted; long gone;
|
|
|
|
|
make sure of the spelling of the Object name.....otherwise try
Clean Soloution from the Bulid Menu
|
|
|
|
|
in codes, there is BOOK_LOCATOR.DataSet1 and you got error like 'BOOK_Locator.Dataset1'.So may be this because of case sensitive..Check for that too...Otherwise, take a fresh dataset and try once.
suchitamanandhar@hotmail.com
|
|
|
|
|
i have made class named "ServerPaths" and it includes one function named "getServerImagePath()".
function definations is:
public string getServerImagePath()
{
ImagePath= MapPath(AppRelativeVirtualPath.ToString()).ToString();
return ImagePath;
}
Now i want to use this class to get the imagepath in .aspx source view. I mean in html.How can i get this ????
modified on Monday, May 10, 2010 10:11 PM
|
|
|
|
|
If you are using Server-side Image control,
Image1.ImageUrl = getServerImagePath();
If you are using HTML image tag,
<img src="<% =getServerImagePath() %>" />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
If you have this variable as protected in codeBehind, in ASPX page, you can say
<%=strPath%>
|
|
|
|
|
Hi,
I have an ASP.NET AJAX enabled user control which is using ResizableExtender and DragPanelExtender from ASP.NET AJAX Toolkit.I am creating this control dynamically on a page. Page has an UpdatePanel also which is acting as container for this control. On page there is a button for creating this control. Upon clicking on this button control is added to the page. When we click on button page is posted back to the server and i create control in Page_Load event handler. I have no problem with control's state or values in it but i want to create it without using Page events(Init,Load etc). Is there a way we could create a user control using Javascript and AJAX techniques without relying on Microsoft Extensions.
Any help will be greatly appreciated.
Thanks,
Ahmad
|
|
|
|
|
Hi i woud like to know how to retrive a session state from a Class.
Thanks in advance
|
|
|
|
|
Console.WriteLine(Session["mysession"]); ??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Normaly This woud be ok, but I wan't to retrive session from class, that the class isn't inherited from anything.
So I Can't access Session class
|
|
|
|
|
Where did you put this class? in Web Project or somewhere??
I have tried with the following code. it works..
In Default.aspx
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
Session["mysession"] = "d";<br />
<br />
}<br />
protected void Button2_Click(object sender, EventArgs e)<br />
{<br />
Class1 obj = new Class1();<br />
Response.Write( obj.getValueFromSession("mysession"));<br />
}
In Class1.cs
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
<br />
public class Class1<br />
{<br />
public Class1()<br />
{<br />
}<br />
public string getValueFromSession(string key)<br />
{<br />
return HttpContext.Current.Session[key].ToString();<br />
}<br />
<br />
}<br />
it works fine.. Please try againn.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Gonna try when i get home in about 6 hours
|
|
|
|
|