|
sName is IPAddress
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
And this case , it's the internet ip address and not the pc ip address, isn't it?
2nd thing is that, when using this code, how to suppply internet address for it, do I have to get a code to detect the internet ip address and then pass it to the MAC Function?
THanks
|
|
|
|
|
Hi,
Is it that IIS spawn a seperate worker process for all FTP requests, one for all HTTP requests, one for other
message based requests
or is it that there is only one worker process in totality and there can be any number of application domains no matter
whether the request is FTP, HTTP or any message based requests
Thanks,
NetQuestions
|
|
|
|
|
|
Hello,
I am trying to import gmail and yahoo contacts in my asp.net website. i m using OpenContactsNet.dll and using following code
GmailExtract extractor = new GmailExtract();
NetworkCredential nc = new NetworkCredential(txtUserName.Text, txtPassword.Text);
bool res = extractor.Extract(nc, out list);
But this code is'nt working. I got false responseFrown
what could be the reason??
The .Extract function gives the following error when executes the line of code
HttpWebResponse exportResponse = (HttpWebResponse)contactsRequest.GetResponse();
Error: The remote server returned an error: (401) Unauthorized
Please help me in this regard as i have tried every thing. I place the app on www root but still no luck.. plzz help
|
|
|
|
|
I found following link very useful to do the same..
http://forums.asp.net/t/1144790.aspx[^]
In above link you will also find information regarding OpenContactsNet.dll and use of it.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
After implementing a CSS template to my web site i am getting the following error while running. "Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. "
I searched a lot in net and found some solutions which did not worked for me. But my actual problem is the same code is working in another browser. I am getting the error while i am using IE. What is the reason and solution???
|
|
|
|
|
Hi
I need an editable gridview for ASP.NET MVC 2.0
Can anybody help me?
Thank you
|
|
|
|
|
|
Actually I need editable grid view for mvc 2.0, not for dynamic database
|
|
|
|
|
i have to write a code for
for copying a selected data from excel sheet to data grid
now i m confused that whether i have to open the excel sheet with the program of had to show it to the form because i can't show the whole sheet to the datagrid (as its a requirement of a program) and after opening the sheet how i can copy the data from excel sheet display it on the datagrid
any ideas ??????
|
|
|
|
|
Use this function
public static DataTable getDataTable(string strFilename)
{
string SQL = "select * from [Sheet1$]";
string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + strFilename + ";";
connectionString += @"Extended Properties=""Excel 12.0;HDR=YES;""";
OleDbConnection conn = new OleDbConnection(connectionString);
OleDbCommand cmd = new OleDbCommand(SQL, conn);
DataTable dt = new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(dt);
da.Dispose();
conn.Dispose();
cmd.Dispose();
return dt;
}
|
|
|
|
|
thnx for ur reply
but
it is simply the binding of excel sheet to datagrid
but i have to copy selected data from excel sheet
means when user click on certain record in excel sheet it gets copied in datagrid
okzzz
and plz do tell me also that how to open excel sheet with program for copying the data from it
thnx in advance
|
|
|
|
|
sorry i never do this so no idea.
|
|
|
|
|
i have one datalist and i have taken textbox in headerTemplate of DataList.
i want to get value of that TextBox in Button_click() which is outside of Datalist,
i have used foreach loop for getting textbox value but i m not able to get
so plz help me
|
|
|
|
|
Hai I have a problem while working with calender control.
****If i have selected from date from calender1 as friday and to date from calender2 as monday, calculated the difference between these days by using timespan.
but my problem is friday to monday should come for two days by excluding weekends.
plz reply.
|
|
|
|
|
Dear friends, I am uploading Excel sheet data using FileUpload control and want to store the data into sql server 2005 database. Excel Sheet file name is same as Table name in Database and Column headings are same as columns in database table. In my machine, I don't have MS Office. I am using OpenOffice now. I am getting an error "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 written the following complete code. Please help me. Its very urgent. Please please please. The code is
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data.OleDb;
public partial class _Default : System.Web.UI.Page
{
SqlConnection connection=new SqlConnection("data source=10.0.3.30;initial catalog=rambasedev;user id=sa;password=admin");
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
{
Boolean fileOK = false;
String path = Server.MapPath("~/UploadedFiles/");
if (FileUpload1.HasFile)
{
String fileExtension =
System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();
String[] allowedExtensions = { ".xls", ".xlsx" };
for (int i = 0; i < allowedExtensions.Length; i++)
{
if (fileExtension == allowedExtensions[i])
{
fileOK = true;
}
}
}
if (fileOK)
{
try
{
string xConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + Server.MapPath(FileUpload1.FileName) + ";" + "Extended Properties=Excel 8.0;";
using (OleDbConnection connection = new OleDbConnection(xConnStr))
{
OleDbCommand command = new OleDbCommand("Select EMPNO,ENAME,BASIC FROM [Sheet1$]", connection);
connection.Open();
// Create DbDataReader to Data Worksheet
using (OleDbDataReader dr = command.ExecuteReader())
{
// SQL Server Connection String
string sqlConnectionString = "Data Source=10.0.3.30;Initial Catalog=RambaseDev;Integrated Security=True";
// Bulk Copy to SQL Server
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
{
bulkCopy.DestinationTableName = "SamplePS";
bulkCopy.WriteToServer(dr);
}
}
}
}
catch (Exception ex)
{
Success.Text = "File could not be uploaded.";
}
}
else
{
Success.Text = "Cannot accept files of this type.";
}
}
}
}
Please help me.
Regards,
Dileep
|
|
|
|
|
For .xlsx files I think u will need another connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=filename.xlsx;Extended Properties=Excel 12.0;
u can also Add HDR property to connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=filename.xlsx;Extended Properties=Excel 12.0;HDR=YES;
HDR=YES --> implies that the file has header info in the 1st Row
Try this let me know if it works or not
Tej Aj,
http://opexsolution.com/forum/[^]
|
|
|
|
|
Dear Tej,
I have tried Provider=Microsoft.ACE.OLEDB.12.0;Data Source=filename.xlsx;Extended Properties=Excel 12.0; for .xlsx files. I am getting the following error. Please help me...
ex = {"The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine."}
Regards,
Dileep
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
HtmlGenericControl div = (HtmlGenericControl)Page.FindControl("mydiv");
if (div != null)
{
div.InnerHtml = "test message";
}
}
i used this code, but not working? is there any solution? i search google but cant get relevant answer. please help me.
|
|
|
|
|
The obvious question is why not add the runat attribute?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
if i did add runat="server" i can access mydiv.innerText from .cs page.
please let me know if any way to access that.
|
|
|
|
|
When you add a runat=server attribute to an html element it is automatically wrapped as a HtmlGenericControl. Your first attempt gained you nothing.
So rather than this
HtmlGenericControl div = (HtmlGenericControl)Page.FindControl("mydiv");
if (div != null)
{
div.InnerHtml = "test message";
}
You could have this
div.InnerText = "test message";
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
when i add runat="server" no need to access via
HtmlGenericControl div = (HtmlGenericControl)this.FindControl("mydiv");
please check this image[^]
thank you for your time.
|
|
|
|