|
Ya I got that but not getting where to place as its giving error...
|
|
|
|
|
Hello Everyone,
I have one asp.net application in which I am embedding yahoo map to show the specified address using geocoding. but when I try to run, it gives me an JavaScript Error - 'YMap' is undefined.
Does anybody knows about it?
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
Yahoo has maps ? I'd have thought google maps would be more well known and better documented.
Obviously your script is broken, or you're testing on a PC that can't connect to the yahoo site. Try yahoo, their docs are what you obviously need.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Sonia Gupta wrote: http://www.codeproject.com/script/comments/forums.asp?msg=2260810&forumid=1725#xx2260810xx[^]
Advertising your post on other forums and trying to get reply. Brilliant But this won't really helps you, because it's rude.
|
|
|
|
|
ok sorry Navaneeth....PLease help
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
this is small side of the problem. if you put this code in code behind of asp.net page
protected void Page_Load(object sender, EventArgs e)
{
Image1.ImageUrl = Server.MapPath(@"images/1.jpg");
Image1.DataBind();
}
it will work in microsoft internet explorer,but not in opera and firefox???
any body can help???
|
|
|
|
|
When you run in IE, View the page source of IE see the path of that image.
and then as per that path you need to set in code like.
./images/1.jpg like that.
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
Hi Experts,
Can someone tell why does the button width increases while i am trying to run the web application in another pc ? Your sugestions will help me a lot.
Thanks
CSS.
Sekhar
|
|
|
|
|
Because you didn't set a width and so the browser is free to choose one ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
i am using two dropdownlist boxes in my application.the values of one box are append directly from data base in my application.on change of first drop down list i display the vaues of second drop down by using ajax,here for second drop down values are in another page i opened that in ajax,
but here problem is the value of second dropdown is not displayed at page load.plz solve the problem asap.
regards
venkat
|
|
|
|
|
You're writing your own ajax ? You're opening another page that has the second dropdown ? How are you trying to set the selected value in this page, via the URL ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This is from Chandrakanth.
I need some Guidance regarding Dynamic Generic XL Upload With Validation.
Can any one give me some suggestion for this Dynamic Generic XL Upload in C#.
That means in MY Excel sheet in non -specific fields that means...
In my excel sheet fields are not fixed it may be 5 columns,it may be 10 columns.
I have to do this excel uploading with validation ,, while I am doing this excel upload I have to map with stored procedure.. and column data types...
Developer does not involve on every uploading coding part...that means we have to facilitate to end user
Excel uploading any file regardless of fields and data types has to upload with validation...
We have to make general Excel Uploading ,,,,,, with validation using SSIS feature in SQL SERVER 2005
If u have any Idea(any other logic) to do generic excel uploading,,please share with me ...
Thanks in Advance
Chandrakanth.Gaddam
Chandrakanth
|
|
|
|
|
Hi There,
I need your help in the following, i have a web application in server A, which in turn call another application in server B, to upload a file in server B, now the upload part is working fine after upload i have return a Java script to close the window once the upload is completed, the script is not working...below is the script.
private void CloseSelf()
{
//Spit Startup Script to the Page to show the error message
Page.RegisterStartupScript( "CloseSelfWindow", @"
") ;
}
i even tried another script just in Server B
private void closeSelf1()
{
Page.RegisterStartupScript("PopupScript",
"javascript:window.opener='x';window.close();");
}
the above script is working when am opening the page in server B but it not working when am opening the page in server A...
any suggestion or help, please do the needful...Thank for your time.
regards
Ybasha
|
|
|
|
|
Sounds like you have a scrpt on serverA and you want it to run on serverB ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
No the script is in the application which deployed in server B which in turn am calling through server A main application.
|
|
|
|
|
Display monthly data on the webform 54mins ago
Hello All,
I have a simple rek to display monthy data count for a table. I wish to know the best method to achieve this. Should I use a reporting tool of should display it by fetching the data from the database and create a bar graph.
I am able to pull the data from the database with two columns Month, DataCount. Now i want to display this data in the fom of a bar graph.
I am getting all types of example to create a bar graph from array list. Now I wish to use my dataset to draw the bar graphs. Can anyone help. the data wud be like
Months Data
1 5
2 3
3 7
4 9
5 0
.
.
.
.
.
.
12 40
Please help.
Thanks
|
|
|
|
|
I'd just create a bar graph using one of the free tools that exist, or write my own. A bar graph is easy to draw.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Chris,
Can you show me how to do that with data from dataset.
Thanks
|
|
|
|
|
I'd expect you'd do it in the database. That's what the database is for.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Chris,
That is something I would have to do at the front end through the code.
To start with that is the thing I am unable to do and looking for some code to dra a bar graph from the dataset that I get from the database
Thanks
-- modified at 13:54 Monday 8th October, 2007
|
|
|
|
|
Now i am in a condition, Where I am just displaying the month names and numbers. There is a small issue. I need to get month names instead of month numbers from Oracle.
here's my query
SELECT Count(*),EXTRACT (MONTH FROM DATE_CREATED),EXTRACT (YEAR FROM DATE_CREATED) FROM MyTable GROUP BY EXTRACT (YEAR FROM DATE_CREATED) ,EXTRACT (MONTH FROM DATE_CREATED)
And the result is 3 columns. Count, Month(Number) and year
something like this
3 10 2006
Please anyone help to convert the month number to month name in oracle or C#. Problem is I cannot use the data formatting functions as this is a single number appearing.
Thanks for any help!!!!!!!!!!!!!!!
|
|
|
|
|
I got my soluin...i posting it here for someone who may need it!!!!!!!!!!!!!!
Select count(*), EXTRACT (MONTH FROM DATE_CREATED),to_char(date_created,'MONTH')month_created FROM MyTable WHERE EXTRACT (YEAR FROM DATE_CREATED) = '2007' GROUP BY EXTRACT (MONTH FROM DATE_CREATED) ,to_char(date_created,'MONTH')
|
|
|
|
|
You mean the ON DELETE SET NULL option in SQL 2005? I don't think there is an equivalent in Access. You should probably run an UPDATE query on your foreign key field before your DELETE query to set any values related to this picture to NULL.
Paul Marfleet
|
|
|
|
|
please have a look to my code.I always have error invalid user name or passwprd , can you help me please.if oyu want me to send you the whole project please let me know.
private void Page_Load(object sender, System.EventArgs e)
{
}
private static string CreateSalt(int size)
{
// Generate a cryptographic random number using the cryptographic
// service provider
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
byte[] buff = new byte[size];
rng.GetBytes(buff);
// Return a Base64 string representation of the random number
return Convert.ToBase64String(buff);
}
private static string CreatePasswordHash(string pwd, string salt)
{
string saltAndPwd = String.Concat(pwd, salt);
string hashedPwd =
FormsAuthentication.HashPasswordForStoringInConfigFile(
saltAndPwd, "SHA1");
hashedPwd = String.Concat(hashedPwd, salt);
return hashedPwd;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.btnLogon.Click += new System.EventHandler(this.btnLogon_Click);
this.btnRegister.Click += new System.EventHandler(this.btnRegister_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void btnRegister_Click(object sender, System.EventArgs e)
{
int saltSize = 5;
string salt = CreateSalt(saltSize);
string passwordHash = CreatePasswordHash(txtPassword.Text,salt);
try
{
StoreAccountDetails( txtUserName.Text, passwordHash);
}
catch(Exception ex)
{
lblMessage.Text = ex.Message;
}
}
private bool VerifyPassword(string suppliedUserName,
string suppliedPassword )
{
bool passwordMatch = false;
// Get the salt and pwd from the database based on the user name.
SqlConnection conn = new SqlConnection( "Server=(local);" +"Integrated Security=SSPI;" + "database=UserAccounts");
SqlCommand cmd = new SqlCommand( "LookupUser", conn );
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter sqlParam = cmd.Parameters.Add("@userName",
SqlDbType.VarChar,
20);
sqlParam.Value = suppliedUserName;
try
{
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
reader.Read(); // Advance to the one and only row
// Return output parameters from returned data stream
string dbPasswordHash = reader.GetString(0);
int saltSize = 5;
string salt =
dbPasswordHash.Substring(dbPasswordHash.Length - saltSize);
reader.Close();
// Now take the password supplied by the user
// and generate the hash.
string hashedPasswordAndSalt =
CreatePasswordHash(suppliedPassword, salt);
// Now verify them.
passwordMatch = hashedPasswordAndSalt.Equals(dbPasswordHash);
}
catch (Exception ex)
{
throw new Exception("Execption verifying password. " +
ex.Message);
}
finally
{
conn.Close();
}
return passwordMatch;
}
private void StoreAccountDetails( string userName,
string passwordHash )
{
// See "How To Use DPAPI (Machine Store) from ASP.NET" for information
// about securely storing connection strings.
SqlConnection conn = new SqlConnection( "Server=(local);" + "Integrated Security=SSPI;" +
"database=UserAccounts");
SqlCommand cmd = new SqlCommand("RegisterUser", conn );
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter sqlParam = null;
//Usage of Sql parameters also helps avoid SQL Injection attacks.
sqlParam = cmd.Parameters.Add("@userName", SqlDbType.VarChar,
20);
sqlParam.Value = userName;
sqlParam = cmd.Parameters.Add("@passwordHash ", SqlDbType.VarChar,
40);
sqlParam.Value = passwordHash;
try
{
conn.Open();
cmd.ExecuteNonQuery();
}
catch( Exception ex )
{
// Code to check for primary key violation (duplicate account
// or other database errors omitted for clarity
throw new Exception("Exception adding account. " + ex.Message);
}
finally
{
conn.Close();
}
}
private void btnLogon_Click(object sender, System.EventArgs e)
{
bool passwordVerified = false;
try
{
passwordVerified =
VerifyPassword(txtUserName.Text,txtPassword.Text);
}
catch(Exception ex)
{
lblMessage.Text = ex.Message;
return;
}
if (passwordVerified == true )
{
lblMessage.Text = "Logon successful: User is authenticated";
}
else
{
lblMessage.Text = "Invalid username or password";
}
}
|
|
|
|