|
i think u have to provide the access credentials to the database in the connection string.
|
|
|
|
|
Can you give me any example or any link to read about it?
|
|
|
|
|
try this sample connection string
Data Source=yourdataserver;Initial Catalog=databasename;Persist Security Info=True;User ID=DBusername;Password=DBpassword
just replace the values from the actual value.
|
|
|
|
|
Try it by using the IP address, Database server User ID and password...
it will work
|
|
|
|
|
My database is inside App_Data folder and I used this connection string but again I cant access my database.
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbname.mdf; Database=mydbname;Trusted_Connection=Yes;
|
|
|
|
|
I have a gridview in my form which populates data when loading the form. There is a dropdown on the top of the gridview which shows 'Results per page:' . It has values of 10, 25, 50 & 100, which is working fine. There is also an Export to Text functionality as well as there is an hyperlink in the gridview.
The issue is: when I change the number of results per page to 25, it displayes less than or equal to 25 records and when come back to page after export to test and then click on gridview hyperlink, the dropdownlist still shows 25, but records in gridview will be in three pages, 10 in each page.
Even though I added the code history.go(-1) in the new form when clicking on hyperlink in the gridview, it is not maintaing the history and shows incorrect results. This is happening only IN IE and not in Firefox. ANy idea how this is happening? Any fix for this? please help.
Thanks,
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
|
have u tried setting rows per page to 25 in the page_load.
|
|
|
|
|
Hi All,
I have a image button. I would like to call client side function as well as server side function in same button in same time.
remember I don't want to call any javascript confirmation.
Need yours advice....
|
|
|
|
|
vnsraj wrote: I would like to call client side function
vnsraj wrote: remember I don't want to call any javascript confirmation.
You just can't do it. You CAN call client side methods BEFORE calling the server, but, by definition, it has to be javascript. What else could it be ? Do you know what it is you're asking ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
vnsraj wrote: remember I don't want to call any javascript confirmation.
what you mean exactly?
Your question is not clear.
BTW use OnClientClick for adding client method and OnClick for server side code.
|
|
|
|
|
I have a image button, I want to called a server side function in image button onclick function on same time I want to called a javascript function.
|
|
|
|
|
Its possible to inject javascript snippets using ScriptManager.RegisterStartupScript .
Why you want 2 do that?Actually vat u r trying 2 achieve?
|
|
|
|
|
When I try to open new website in my visual studio it give a massage "no template are found" and open a window but there is no option of selection
|
|
|
|
|
What are you doing exactly ? What version of VS do you have ? Do you get a new project ? Can you add pages to it ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
VS 2.0...actually I try to create a new website(i try to file->new->website or project) same problem also with new project ..but able to add new web page in existing project.
|
|
|
|
|
public partial class _Default : System.Web.UI.Page
{
OleDbConnection oo;
OleDbDataAdapter adp;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
oo = new OleDbConnection(ConfigurationManager.ConnectionStrings["xls"].ConnectionString);
adp = new OleDbDataAdapter("select EID from [Sheet1$]", oo);
if (!IsPostBack)
{
ds = new DataSet();
ViewState["ds"] = ds;
adp.Fill(ds, "sheet1");
GridView1.DataSource = ds;
GridView1.DataBind();
}
else
{
ds = (DataSet)ViewState["ds"];
GridView1.DataSource = ds;
}
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
int pos = e.RowIndex;
string name = ((TextBox)GridView1.Rows[pos].Cells[1].Controls[0]).Text;
ds.Tables[0].Rows[pos][0] = name;
ds.AcceptChanges();
GridView1.EditIndex = -1;
GridView1.DataBind();
}
protected void Button1_Click(object sender, EventArgs e)
{
adp = new OleDbDataAdapter("select EID from [Sheet1$]", oo);
OleDbCommandBuilder xx = new OleDbCommandBuilder(adp);
adp.Update(ds, "sheet1");
}
----------------------------------------------
In the above code,
In page_load: Reading from excel. It works fine. Gridview is bind with that. Works fine.
update the date in gridview(working in disconnected mode). Row_updating works fine.
Now want to transfer the data from disconnected excel to same excel in connected mode (written under button1_click).
Data is not getting pdated in connected excel.
Why?
|
|
|
|
|
Why do you want to pass data between excel sheets in a webpage ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Requirement is to map a excel sheet data to gridview in ASP.NET.
Make changes to excel using gridview in disconnected mode.
After that, transfer the chnages to same excel in connected mode.
|
|
|
|
|
Hi ,
two notepad are running one is saved as first.txt other is saved as second.txt how to kill only one process first.txt
I am using the following code which is closing all the notepad
foreach (Process pre in Process.GetProcesses())
{
if (pre.ProcessName.StartsWith("notepad"))
{
pre.Kill();
}
}
Regards,
Amit Patel
|
|
|
|
|
1 - you're an idiot
2 - you got your answer when you asked in the right forum, so why ask in a forum that has nothing to do with your question ?
3 - see 1.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i don't think thats possible .. all notepad instances use the same process
|
|
|
|
|
Hi all,
I am trying to add a pop calender in content page...
guide me or send some code.
thnks in advance
|
|
|
|
|
Have you read the documentation ? What have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|