The Web Site Can Not Be Uploaded With The Datagridview Inserted?
Nov 3, 2010
I inserted a SQL DataSource to a web site in the design view and I stablished the connection with the server, then I selected the table, the fields and in the advanced options I choosed the options of insert, delete, and update, then I made the connection test and it works properly, it shows the data included on the table chosen
after this I inserted a datagridview and then I selected the origin of the data and I enabled the options of selection, update, and insert And everthing looks ok, but when I load the web site, this error is shown,
This is the error
-------------------------------------------------------------------------
Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
View 1 Replies
Similar Messages:
Jun 2, 2010
After publishing the web application on the web host there si following error.It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
View 1 Replies
Feb 17, 2011
I am new to asp.net and was trying to use datagridview in my webform. I was able to bind it to my database but I cannot make the datagridview's buttonfield respond. It seems the grid's SelectedIndexChanged event is not being fired or has issues with postback. Even a very simple statement is not being executed by the program e.g.
protected void grid_SelectedIndexChanged(object sender, EventArgs e)
{
detailsLabel.Text = "asdfasdfsafasddf";
}
It seems the SelectedIndexChanged is not being fired. I have checked my IE and scripting is enabled.
I am using VS 2008 and IE7. Can anyone share a solution on how to solve this issue?
View 7 Replies
Mar 23, 2011
I am building a web page that will be presenting users two dataset results from two stored procedures in sql but the data is not similar. Is it possible to present both datasets to users in one datagridview? I am unable to do a union of the data in SQL due to the fact that the results aren't similar and wanted to see if I could work around this issue with .net.
View 3 Replies
Mar 22, 2010
How to move to next page in datagridview.I have n number of pages.I enabled autopaging.Its showing ">" link.But when i am clicking it is not moving to next page.My grid is inside a update panel....What is the reason.
View 1 Replies
Feb 13, 2010
I have a data gride view in asp.net with C#. I want to Insert data into only datagrideview with row by row.Finally, I want to Insert data into Database from datagrideview.
View 1 Replies
Feb 12, 2010
I have a Datagrid in image below. [URL] I can't find row Index in Datagridview when I call a event in DropDownList.
protected void DescriptionOfProduct_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList _DescriptionOfProduct = (DropDownList)gvSales.FindControl("DescriptionOfProduct");
Label _Unit = (Label)gvSales.FindControl("Unit");
Label _PriceType = (Label)gvSales.FindControl("PriceType");
//...
}
View 2 Replies
Mar 22, 2011
I'm trying to delete a record in DataGridView but it is giving me this error:
Must declare the scalar variable "@reg_id".
My reg_id is the primary key column in the table. How can I resolve this?
View 1 Replies
Jan 11, 2010
Tell me some major points which differentiate Datagridview to Gridview in asp.net?
View 4 Replies
Mar 25, 2010
I need to put a combobox in every column in the first row of my datagridview. It has already been filled with a dataset.
View 4 Replies
Mar 1, 2011
I wanted to know how to edit the value in datagridview for the updating the data dynamically in database using "SqlCommandbuilder"
I tried with SqlCommandbuilder but its returning me an error.
View 2 Replies
Dec 5, 2013
I have a datagridview control bound to a dataset.
AutoGenerateSelect is set to True.
In the Select column the text Select appears.
How do I replace the Select Text with a Select Button?
Am working with VS2012 and coding in VB.
View 3 Replies
Aug 20, 2010
i just the beginner.My db is using MS SQL server 2008
View 7 Replies
Mar 24, 2011
can I have an auto extender to my textbox which is in datagridview. I am using it in footer template for inserting a new row to the gridview.
View 1 Replies
Dec 17, 2010
i am working on visual stdio 2008 and my database is in sql server 2005 MY table has three columns
1. SenderName
2. RecieverName
3. Message
i have displayed this table in GridView and add a button named as Reply so my grid view look's some what like this
SenderName|RecieverName| MessAge|REPLY BUTTON
now this what i want to do when Button is Clicked in My gridView i need to get data of that specific row i.e Sender's NAme so that i can Reply him/her?
View 3 Replies
Nov 21, 2010
I implemented clickable rows in datagrid using ajax. The problem is, when I click the row in the Results page I redirect to another page to view the data. In that page I have an "update" button that I can update the data in the table in the DB and when I click it, I redirect back to the Results page and then click the same row again to view its details, the data isnt updated and its still old data. The thing is, the data is being updated in the table in the DB, its like the page is saving the old data he brought and using it and I dont know how to tell him to bring new data. Here is the code to make clickable rows:
protected void pendingGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "return GetDataUsingAJAX(" + e.Row.RowIndex + ",'pending');");
e.Row.Attributes.Add("style", "cursor:hand");
}
}
here is the javascript of Results page:
function GetDataUsingAJAX(row, table) {
obj = new XMLHttpRequest();
if (obj != null) {
obj.onreadystatechange = RedirectToViewDetails;
obj.open("GET", "Results2.aspx?row=" + row + "&table=" + table, true);
obj.send(null);
}
return false;
}
function RedirectToViewDetails() {
if (obj.readyState == 4) {
if (obj.status == 200) {
var retval = obj.responseText.split("&");
window.location = "YellowCardStart.aspx?mode=" + retval[0] + "&cntct=" + retval[1] + "&strtDate=" + retval[2] + "&endDate=" + retval[3] + "&strtTime=" + retval[4] + "&endTime=" + retval[5] + "&tools=" + retval[6] + "&id=" + retval[7] + "&table=" + retval[8] + "&bldng=" + retval[9] + "&loc=" + retval[10] + "&devTool=" + retval[11] + "&cmpny=" + retval[12] + "&phn=" + retval[13] + "&lssApp=" + retval[14] + "&ehsApp=" + retval[15] + "&cmnts=" + retval[16] + "&created=" + retval[17]; }
else {
alert("Error retrieving data!");
}
}
}.............
View 3 Replies
Aug 5, 2010
I have datagridview with paging enabled. But when I want to move from page to another page in the grid, then it only works when I press the 2nd time on some other page. I read some on the internet that I need to bind the data of the gridview but the thing is, I cant bind the data again because the gridview was filled with data in the page_load from querystring and I dont really want to go over the querystring again in the PageIndexChanging function.
protected void searchGridFA_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
searchGridFA.PageIndex = e.NewPageIndex;
}
So why does the page changes only from the 2nd time I press it?
View 1 Replies
Feb 7, 2011
I am using LINQ to access and manipulate data present in the database,I have a table named SampleTable which has two rows one for Username and other forPassword, i am able to edit, read, delete, select data from this table and show the data onto theDataGridView control.My problem is when i edit the data in the this dataGridView I want the altered data to be saved back into the database, i have googled a lot before posting here.
View 1 Replies
Aug 23, 2010
I'm filling a previously created DataGridView on an ASP.NET Web Form dynamically with a DataTable, but I want to change the name of the columns that appear on that DataGridView, and I simply can't figure out what I'm doing wrong. Below is the code:
DataTable dtUsuarios = DBManager.RunSqlGetDataTable(
@"select b.UserName, c.Email, c.IsLockedOut, c.LastLoginDate,
case
when e.RoleName is not null then 1
else 0 end Admin
from dbo.aspnet_Applications a join dbo.aspnet_Users b
on a.ApplicationId = b.ApplicationId
join dbo.aspnet_Membership c
on b.ApplicationId = c.ApplicationId
and b.UserId = c.UserId
left join dbo.aspnet_UsersInRoles d
on d.UserId = b.UserId
left join dbo.aspnet_Roles e
on d.RoleId = e.RoleId
where a.ApplicationName = 'Mont Blanc Catalogo'");
dtUsuarios.Columns["UserName"].Caption = "Nome Usuário";
dtUsuarios.Columns["Email"].Caption = "E-mail";
dtUsuarios.Columns["IsLockedOut"].Caption = "Bloqueado";
dtUsuarios.Columns["LastLoginDate"].Caption = "Último Login";
dtUsuarios.Columns["Admin"].Caption = "Administrador";
DataView dvUsuarios = new DataView(dtUsuarios) { Sort = "UserName" };
gdvUsuarios.DataSource = dvUsuarios;
gdvUsuarios.DataBind();
//gdvUsuarios.Columns[0].HeaderText = "Nome Usuário";
//gdvUsuarios.Columns[1].HeaderText = "E-mail";
//gdvUsuarios.Columns[2].HeaderText = "Bloqueado";
//gdvUsuarios.Columns[3].HeaderText = "Último Login";
//gdvUsuarios.Columns[4].HeaderText = "Administrador";
Setting the values changing the caption of the DataTable doesn't work, and after the DataBind, the Columns.Count property for the DataGridView return zero columns! After executing the code, everything appears normally at my asp page, but the captions are wrong.
View 3 Replies
Dec 30, 2010
this is my first question here.I`m making work a datagridview, modalpopup and detailsview. The logic is, in the datagridview is a linkbutton in each row who calls the detailsview inside of the modalpopup showing some information, and it works fine, the problem is in the datagridview, the propertie AllowPaging is set True and PageSize in 5, and when i`m traing to change the Page of the datagridview it just do it the first time, but don`t work the second time and so on. I traied to debbug this, and this happend when the modalpopup is executing the prerender method. I`m not sure how i can fix thisis my code:
<asp:Content
ID="Content1"
ContentPlaceHolderID="ContentPlaceHolder1"
[code]...
View 3 Replies
Dec 2, 2010
I have datagridview with 2 columns. SortMode of first is set to Automatic.
In this grid is a lot rows, and when I change value in the row, for example from xyz to abc I still in position where this row WAS. Edited row jumps to top.
I want to abort this automatic sorting and I want call sorting by left click on column. Be
I found some solution (code below + I set SortMode to Programmatically), but my row still jumping :/ Has anyone solution to tackle with this issue?
private void dataGridView1_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
DataGridViewColumn newColumn =
[Code]....
View 1 Replies
Apr 19, 2014
Basically, I have a gridview table with a dropdownlist column and I need a way to retrieve the selected item from it. Now I'm using an imagebutton in order to get the selected item from the dropdownlist to pop-up as a message box (as a string). I already know how to get text from a boundfield. However, using the same code to get the dropdown list item won't work. This is a snippet from my code:
ASP code:
Select...
8:00
9:00
10:00
11:00
12:00
1:00
2:00
3:00
4:00
Visual Basic code:
<asp:BoundField DataField="Case#" HeaderText="Case#" ReadOnly="True" />
<asp:TemplateField HeaderText="Surgery Time">
<ItemTemplate>
<asp:DropDownList ID="Time_Slot" runat ="server">
<asp:ListItem Selected="True" Value="0">Select...</asp:ListItem>
<asp:ListItem Value="1">8:00</asp:ListItem>
[CODE]....
View 1 Replies
Jul 1, 2011
I am using vs 2008 in asp.net.. I have a field of [product_pic] which is 'varchar(50)' in my table.. my problem how can i show the image in datagridview? I can only the text which is the file name of the image..
View 2 Replies
Jul 6, 2011
just asking if how can i load image on a datagridview?
i have a 'imgphoto' field which is 'varchar(50)' and the value are only text like 'image1.jpg', 'image2.png' etc..
the image.jpg exists and its location is on the server also with folder 'imgs'
so how can load into the datagridview as an image of each row..
View 1 Replies
Jul 18, 2011
In gridview [ID] and [ProdName] is BoundField and [ThumbNail] is TemplateField.. I use the code below but the image still doesn't show..
Code:
DataTable oTable = new DataTable("ItemList");
oTable.Columns.Add("ID", System.Type.GetType("System.Int32"));
oTable.Columns.Add("ProdName", System.Type.GetType("System.String"));
oTable.Columns.Add("ThumbNail", System.Type.GetType("System.String"));
[Code] .....
View 3 Replies