|
am developing a local site
how can i get the ip address or computer name of the server once a page is called?
there is no specified server any client is a candidate for being a server
|
|
|
|
|
Hi,
Below Code gives you the computer name,
System.Environment.MachineName
Hope helps u...
|
|
|
|
|
thx a lot
|
|
|
|
|
Hi,
I have 2 dropdownlists boxes.One for country and another for state.I have 2 tables countries and states where countrycode is a foreign key in states table.Now I WANT TO write javascript to populate the second dropdownlist based on the country selected in the first dropdown list.Now I want the code to accomplist this task.
With Regards,
Uma
|
|
|
|
|
May be it will help you
// Create arrays containing state cities
// Note: These arrays could be created dynamically
var arrStates, arrFlorida, arrNewYork, arrTennessee
arrFlorida = ["Daytona Beach", "Miami", "Orlando", "Tampa"]
arrNewYork = ["Albany","New York", "Oakland", "Rochester"]
arrTennessee = ["Gatlinburg", "Knoxville", "Memphis", "Nashville"]
arrStates =[arrFlorida, arrNewYork, arrTennessee]
// Function to handle dynamically altering the contents of the City List box
function handleChange(newDisplay)
{ var StateSelect, CitySelect, NumEntries, i
StateSelect = document.frm.States
CitySelect = document.frm.Cities
// Delete all entries in the cities list box
for (i = CitySelect.length; i > 0; i--)
{
CitySelect.options[i-1] = null
}
// Add comment option to City List box
CitySelect.options[0] = new Option("-- Select City --",0)
// If state is selected add its cities to the City List box
if (newDisplay >= 0)
{
NumEntries = arrStates[newDisplay].length
for (i = 1; i <= NumEntries; i++)
{
CitySelect.options[i] = new Option((arrStates[newDisplay])[i-1],(i))
}
}
CitySelect.selectedIndex = 0
}
-- Select State --
Florida
New York
Tennessee
-- Select City --
handleChange(-1)
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hello ,
I am getting the following error
"document.frm.States is null or not an object" what could be the reason?
Regards,
Uma
|
|
|
|
|
hi all,,,
how i can to add site(url) to favorites in asp.net????
thanks .
|
|
|
|
|
Like this
<input id="btnBookmark" type="button" value="Add To Favorites" onclick="window.external.AddFavorite(location.href, document.title);">
|
|
|
|
|
|
Hi,
What are the testing tools that are used to test a ASP.NET (c#) project? Can someone give me a good idea abt those.
Uma
|
|
|
|
|
I am trying to send Mail through System.Web.MailMessage. When I send the mail to
an address that is local to Smtp Mail Server, it reaches at the destination address. Suppose my Smtp Server is mail.123.com and my mail address is sandy@123.com. When I send mail to this address through Web.MailMessage class,it reaches the destination address with ease. However when i want to send the mail to an address that is external to SMTP Server(suppose sandy@gmail.com),it shows me an exception
Exception Details: System.Runtime.InteropServices.COMException: The server rejected one or more recipient addresses. The server response was: 550 Authentication is required for relay
Source Error:
Line 47: mail1.Subject="Just to say Hi";
Line 48: System.Web.Mail.SmtpMail.Send(mail1);
When I send the mail through Outlook Express through sandy@123.com, it easily reached at sandy@gmail.com but the above said programming method is not working. Please suggest me the solution for the above problem and any settings
that I need to perform
Thanks,
Sandy
|
|
|
|
|
How to get uppercase letters on the monthtitle in the asp:calendar control?
|
|
|
|
|
Even after setting EnableViewState=false values are still retained in my textbox.How to solve this problem?Could any one help me out?
www
|
|
|
|
|
What are you going for?
One way is to empty the textbox.text at postbacks.
If you don't need the value in the textbox at serverside then use a <input type="button" instead.
|
|
|
|
|
Actually i don't want to write any code.
I want to use EnableViewState property. What is the use of it? Have you ever tried it. If so let me know
your name
www
|
|
|
|
|
I want to develop a site for hosting BLogs and Forums. can any body help me regarding this? what are the things to be concidered? how to store the blog or article once it posted? how can i manage the web site like retrieving the blogs, displaying, allowing updates, deletion etc.
Ramesh.Kanjinghat
|
|
|
|
|
Hi!
my gridview contains data from sql server store procedure
in store procedure first column is hyperlik type as
e.g select df as abc from table1
so on gridview i want a first colum with underline i.e underline the dg
this thing is possible with datagrid but not on grid view
plz ASAP
waiting for reply
sbjadhav
|
|
|
|
|
Problem:- So much delay in getting the event fired
I am having this much server controls in my page
1. 8 drop downs
2. 3 list box
4. 4 text box
5. 1 repeater control and other labels
When i click on any server control it is taking too much time to fire the event alone
Note:
1. Page load event have very little code
2. All the controls have viewstate enabled
3. During the intial page load there is no delay.
4. Framework is 1.1 and IDE is 2003
If anybody could traceout, then it would be a great help to me.
Thanks in advance
|
|
|
|
|
How long time is "too much time"? A millisecond? A second? A minute?
---
b { font-weight: normal; }
|
|
|
|
|
A minute
Other files in the Project don't have this delay
|
|
|
|
|
I myself solved the problem.!
Thanks for the time spend.
As i expected it was the problem of Viewstate. I was holding one dataset of 5000 records in Viewstate.
|
|
|
|
|
Hi ,
How to write the database connection(insert,delete or select query) within javascript function in asp.net.Is it possible.Anyone can you help me
Thanks
|
|
|
|
|
You're expecting to connect to a database that is on the clients machine ? How can you guarentee it is there ? What are you trying to do ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Taking on board what Christian has said above, think that you need a way to update a server-side db without posting back the whole page?
If that's the case, then have to use AJAX, but if you don't mind the postback, just submit the form as usual and process on the server.
Why does it have to be in js?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
-- modified at 12:02 Thursday 4th May, 2006
|
|
|
|
|
Hai,
The following is my queries.
1: Is it possible to have check constraint with a local variable?
2: Given the following scenario:
I have three columns in a table ,say ID int,name varchar, address varchar, and I added 10 records into that table keeping ID colums NULL.Later I want to add values to ID columns 1 thru 10 but with a single update query.(It doesn't means you are bound to use only 1 satement in the batch, no loop permitted )
Please show me a right way.Thanks very much.
Thank You,
Rahul.P.Menon.
|
|
|
|