|
hi,
try "OnClientClick" property of button control to specify java script function at design time.
<asp:button OnClientClick="doClick('pram1','param2');"/>
Sherin Iranimose
|
|
|
|
|
Hey i think u need to pass it using quotes..
var butt1 = document.getElementById('buttonname');
Try this out...
Koushik
|
|
|
|
|
the way to check this is that you view the html code of the button generated at client side...
<< >>
|
|
|
|
|
Hi all,
i ned to maintain session and i need to get the session id and i have to keep in a table .I dont have any idea about sessions plz give me code for how to creatw a session .
Suresh.R
|
|
|
|
|
Session : Course of visit to a particular website
When a user starts visiting the site the session will start.
In the course of visit we can store states in session variables like
Session["LoginTime"] = DateTime.Now();
...... like this we can use many session variable to maintaning the state.
Session.SessionId is the unique id to refer a particular user visits.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
hi,
i have an application in which there are two hyperlink controls. In both properties text is underlined. If clicked on one, the clicked one shouldn't be underlined. Same thing should happen for the click of other hyperlink. How to do this?
|
|
|
|
|
You need to use style sheet for this purpose. Some what similer to..
a:visited{
text-decoration:none;
}
a:visited{
text-decoration:underline;
}
Lets work it Out.........!
|
|
|
|
|
please explain...me new to web applications..
In Html code it in a column as below:
<asp:hyperlink id="hlinkArchive" runat="server" height="19px" navigateurl="~/frmDailyStats.aspx" target="_self" style="z-index: 100;
left: 617px; position: absolute; top: 32px" width="101px" font-underline="True">Archive Transfer
Now where i put that code which you sent...kindly explain..
Thanks
|
|
|
|
|
|
I have two strings as shown below
strA="Ashok";
strB="Aravind";
What i need to do is i have to compare both strA and strB then i have to delete the equall chracter.For example here in both string 'A' is equall.So i have to delete tat 'A'.Plse help me. Thanks in advance
|
|
|
|
|
I am not going to give code for this.
I am giving logic.
Take the length of two string.
Traverse character by character till the lowest string length.
While traversing check the charcters using indexOf method. If you find the matching character, replace it.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
I dont know any code for that is available..
try this
Dim i As Integer
Dim str1 As String = "Ashok"
Dim str2 As String = "Aravind"
For i = 0 To str2.Length - 1
If (str1.IndexOf(str2.Chars(i)) <> -1) Then
str1 = str1.Remove(str1.IndexOf(str2.Chars(i)), 1)
End If
Next
Str1 will be "shok"
Sherin Iranimose
|
|
|
|
|
Hi fellow coders,
I'm wondering how is the GridView implemented? I'm sure it must be using asp:Table, but maybe I'm wrong.
The reason for me asking this is that I'm just rewriting some stuff I did when I started out in ASP.NET to make it faster.
Basically I have a huuuuge ASP:Table control I build programmatically with info I got from my DAL/BLL layer. Unfortunately it ran slow as a dog. Now I've simply removed it and plugged in a GridView instead and bind it to a DataTable I get from the DAL/BLL layer. It's SO much faster, and that leads me to wondering how it's implemented (although constructing the ASP:Table was a big hassle compared to using the GridView I'm confident I didn't do anything stupid).
Just wondering...
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
I have two buttons CONNECT and MONITOR. using reference of the dll I am able to connect to my Telephony server API using INVOKEMETHOD but when I am clicking on MONITOR button page is reloading where i am unable to keep the connection to the server, resulting message... Unable to Monitor because I need to Connect to TS before Monitoring it.
Can anybody suggest.....Thanks in Advance
sharad
|
|
|
|
|
That's the effect of the ASP.NET page lifecycle. Use a static class to hold the connection. That way, it'll persist across page reloads.
SG
|
|
|
|
|
Can we get the username and password of the machine on which our asp.net application is running.
Do anyone know the way .Can anyone please give me some idea.
Its urgent.
thanks in advance.
|
|
|
|
|
Use <authentication mode="Windows" /> in your web.config. This is generally used for Intranet applications .
U can retrieve the current logged-in user name as follows.
System.Web.HttpContext.Current.User.Identity.Name
Koushik
|
|
|
|
|
I suceeded with it but i want password also.
-- modified at 8:01 Thursday 10th May, 2007
|
|
|
|
|
You wont be able to extract the password. It's maintained by Windows and is hashed!!
Just imagine what would happen to security if you could find out a windows password using a few lines of code!!
SG
|
|
|
|
|
then too there might me something . if anybody knows please let me know.
|
|
|
|
|
yup , u can't retrieve password !
Koushik
|
|
|
|
|
hi,
In a button click, i have to read datas from excel sheet and store it in mysql database table. This is my code for that
private void Button1_Click(object sender, System.EventArgs e)
{
try
{
string strConnection =("Driver={Microsoft Excel Driver (*.xls)};DriverId=790;bq=C:\\Salary.xls;DefaultDir=c:\\;");
OdbcConnection conn = new OdbcConnection(strConnection);
//conn.Open();
OdbcCommand command = new OdbcCommand("SELECT * FROM [Sheet1$]",conn);
// command.Connection = conn;
// command.CommandType = CommandType.Text;
// command.CommandText = "SELECT * FROM [Sheet1]";
OdbcDataAdapter da = new OdbcDataAdapter(command);
DataTable dt= new DataTable();
conn.Open();
da.Fill(dt);
conn.Close();
//return dt;
}
catch (Exception ex)
{
lblError.Text = ex.Message;
//return null;
}
}
I get an error like this.
ERROR [42S02] [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'Sheet1$'. Make sure the object exists and that you spell its name and the path name correctly.
I have specified my path name correctly in the connection string and my sheet name is Sheet1. but i don't know why i get this error. Anybody pls help.
Regards
Vijay.
|
|
|
|
|
string connection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Salary.xls;Extended Properties=Excel 8.0;";
DataSet bulkData=new DataSet() ;
OleDbDataAdapter adap = new OleDbDataAdapter("SELECT * FROM [SheetName$]", connection);
adap.Fill(bulkData);
the data is now in bulkData
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
I dont know why that error has come but better to use OleDbConnection than ODBCCOnnection
use as below u will get it...
string strConnection = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Salary.xls;Extended Properties=""Excel 8.0;HDR=YES;""";<br />
OleDbConnection conn = new OleDbConnection(strConnection);<br />
OleDbCommand command = new OleDbCommand("SELECT * FROM [Sheet1$]", conn);<br />
OleDbDataAdapter da = new OleDbDataAdapter(command);<br />
DataTable dt = new DataTable();<br />
conn.Open();<br />
da.Fill(dt);<br />
conn.Close();<br />
<br />
}<br />
catch (Exception ex)<br />
{<br />
Response.Write( ex.Message);<br />
<br />
<br />
<br />
}
Koushik
|
|
|
|
|
thanks koushik,
I have used Oledb connection instead of odbc connection and got those datas. but the thing is that i have to insert those datas in mysql database table. can u pls help me with C# code for that.
Regards
Vijay.
|
|
|
|