|
Hi,
I have a web application that inserts data, and I am looking at capturing the created and updated date. Is there a way of determining/capturing a date and time from a specific country? What I mean is if I go to the details page of a product then I must be able to see the product was inserted with a European time, etc. etc. etc.
Please can someone advise me what to do?
Regards
Brendan
|
|
|
|
|
The JavaScript Date class has a getTimezoneOffset[^] method. When a user inserts a product, you could set the value of a server-side hidden field to the value returned from this method for the date/time the user has entered before the postback occurs. On the server-side, you should then be able to work out from this value which timezone the user is based in.
Hope this helps.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I would like to know if there is a way to access the whole web page DOM like you can for the primary Form (this.Form.Controls[])? I would like to be able to access the the head element and the body element in a similar fashion. This way I could walk the whole page structure.
Thanks,
Leo T. Smith
|
|
|
|
|
this.Page to access the whole page. if header has the runat=server tag then you can access it two ways
this.Page.Header
and
this.Header
-----
|
|
|
|
|
Thanks. This was what I was missing. From here I can get all the rest.
Leo T. Smith
|
|
|
|
|
I have a scenario where I have no influence or choice on how I call a popup from a list page, to show a details page. The list pages lists users, and the admin clicks an edit button that opens a popup to edit a user's details. I would like to cause the list page to refresh when the details popup closes. Can I even do this, and how?
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
in the popup page do this on window.close();
opener.window.location.reload();
-----
|
|
|
|
|
Hello,
I want to store some users in an XML file. A user has a username, a display name and a password.
Do I need a separate XML file or can I use web.config?
I need to list the users by username to populate a drop-down list and I also need to authenticate users by checking their passwords.
Here is my sample users XML file:
<?xml version="1.0" encoding="utf-8" ?>
<users>
<user>
<userid>bj</userid>
<displayname>Bob Jones</displayname>
<password>aaaa</password>
</user>
<user>
<userid>jd</userid>
<displayname>John Doe</displayname>
<password>bbbb</password>
</user>
</users>
So I need to write two methods:
1. List each userid
2. Return the password for a named userid
And is there any way of using the web.config for this so my system administrator can just use that rather than the separate users.xml file?
|
|
|
|
|
Have a look at this article[^] on creating custom configuration sections in web.config.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I don't know about web.config, but from separate xml file yes.
1. List each userid
DataSet xmlDS = new DataSet();
xmlDS.ReadXml(xmlfilewithpath, XmlReadMode.Auto);
gv.DataSource = xmlDS; // gv is a gridview control on the page
gv.DataBind();
2. Return the password for a named userid
// new xml document
XmlDocument xmlDoc = new XmlDocument();
// load the current file as XML document
xmlDoc.Load(xmlfilewithpath)
// get the password
XmlNode curNode = xmlDoc.DocumentElement.SelectSingleNode("users/user[userid='jd']");
string pwd;
if(curNode != null)
pwd=curNode.SelectSingleNode("password").innerText;
-----
|
|
|
|
|
Thanks for the answers
|
|
|
|
|
hi,
i want call a .asp file in html source of dotnet 1.1
i hv done the followings
> place the .asp file in application folder
> within html source i place a frameset and call the asp page there.
but it gives the error message like file not found and page cannot be displayed.
so please give me some code to solve this problem
thanks in advance
bikash
|
|
|
|
|
It sounds like you have specified the link to the asp page incorrectly. View the source for the page and check if the URL is correct.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
We have sql server replication snapshot index script file (db.idx and db.dat). We want to read data from idx file using c# or vb. Any help will be highly appreciate.
-----
|
|
|
|
|
This has nothing to do with web applications. ASP.NET has nothing to do with databases.
|
|
|
|
|
well I have posted it SQL/ADO section, but as per my understanding it falls in .net section because I want show the data on the web page using either vb or c#. Anyhow, thanks for your tip
-----
|
|
|
|
|
hello everbody
just think i have two page on my application mainPage.aspx and popupMore.aspx . on btnPopup click event (inside mainPage.aspx) open a new window name popupMore.aspx.
what i want to do is, when popupMore.aspx is open then mainPage.aspx is enabled=false
condition is, i have to close the popupMain.aspx first to enable my main. a good example is ajax ConfirmButtonExtender (you have click ok or cancel button other your page will not be working)
any instruction will be really helpful
thanks in advace
Sarfarj Ahmed
|
|
|
|
|
do this o open the popup window
var childWin;
function openWin()
{
childWin = window.open('childwin'.....);
}
and add a function in main page and call it on focus of the main page, on focus function should be something like..
if(childWin)
childWin.focus();
-----
|
|
|
|
|
thnaks for ur quick reply
im a bit confused, if have any example please send me. it will be more helpful for me
thanks in advancve
Sarfarj Ahmed
|
|
|
|
|
on the main page do this:
<script language="javascript"><br />
var childWin;<br />
<br />
function openWin()<br />
{<br />
childWin = window.open(urlForThePopupPage);<br />
}<br />
<br />
window.onfocus = checkPopup;<br />
<br />
function checkPopup()<br />
{<br />
if(childWin)<br />
childWin.focus();<br />
}<br />
</script>
-----
|
|
|
|
|
Thanks For Your Help
Its really helpful.
is their anyway that i can put the childWin height, width etc?
thanks in advanvce
Sarfarj Ahmed
|
|
|
|
|
<br />
window.open(url,"newWindow", "status=no,directories=no,width=450,height=120,top=50,left=120,location=no,menubar=no,toolbars=no,scrollbars=yes,resizable=yes");<br />
you can change the values to yes or no as requyired
-----
|
|
|
|
|
Hi All
Well I want to consume a webservice using javascript. I want my client to just Copy/Paste small piece of javascript in HTML. Somewhat like Google Adsense and other API's provided by Google.
Please suggest any reference Article/ Project to accomplish this....!
|
|
|
|
|
wEb GuRu... wrote: Well I want to consume a webservice using javascript
Yeah. It's possible.. You can use XmlHttpRequest object to invoke the webservice.. You should use "POST" instead of "GET" while invoking.
(Note: You can use the pure Javascript code to consume the .NET webservice. You don't need to use "htc" for that.)
I can give you the example how to comsume the Webservice from Javascript if you want.. I think you probably don't want because there is no relationship between "consuming the webservice from JS" and "I want my client to just Copy/Paste small piece of javascript in HTML. somewhat like Google Ads."
wEb GuRu... wrote: I want my client to just Copy/Paste small piece of javascript in HTML.
You want your client to copy and paste small piece of Javascript??? so, i will tell them to copy and past. btw, who are they??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi
I want to fetch the cost of various products from other websites for our own use so that i can use these figures in our project programmatically.
Simply i want to access cost of various products from other websits.
How can i do this.
please help me as soon as possible...
krishna veer singh
|
|
|
|