|
hi
thanks for the reply
my problem is i am not able to connect to the smtp server
can anyone help me out
my code is:
in my web.config file i have:
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
host="my id address here"
port="25"
defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
my asp.net c# code is
MailMessage msgMail = new MailMessage();
msgMail.To = txtEmail.Text;
SqlCommand slistname = new SqlCommand("select * from list_builder where listid=" + selVal, conn);
drSubGroups = slistname.ExecuteReader();
while (drSubGroups.Read())
{
msgMail.Subject = drSubGroups["ListName"].ToString();
}
SqlCommand sAccoutdet = new SqlCommand("select * from create_account where UserId=" + Session["UserId"].ToString(), conn);
drSubGroups = sAccoutdet.ExecuteReader();
while (drSubGroups.Read())
{
msgMail.From = drSubGroups["EmailId"].ToString();
}
msgMail.Body = "Confirm your subscription";
SmtpMail.SmtpServer = System.Configuration.ConfigurationManager.AppSettings["SMTPServer"];
SmtpMail.Send(msgMail);
K.Gayathri
|
|
|
|
|
1) Format your code snippets when posting
2) Don't repeat the question/reply in multiple places
3) I gave you the answer.
No comment
|
|
|
|
|
hi
i am having my .net application running in my system and i need to send a mail (eg to test to my email id itself).
so i am sending an email from my .net application to my email address hope u got my question now..
i am getting the error a smtp not connected...
K.Gayathri
|
|
|
|
|
I get your question, I got it the first time.
Yes, you have an email address. Good for you. However, your local machine is NOT an email server. ASP.NET and IIS don't just magically route emails around the world. You NEED an email server send an email.
Do you get my response? Let me repeat. Your local machine, ie localhost, is NOT an email server.
No comment
|
|
|
|
|
ya i got what u r saying
for that only i am trying to use smtp to send mails (is it ok)
so now tell me how to send emails..hope u would have got my code from my previous posting..
K.Gayathri
|
|
|
|
|
MalarGayu wrote: how to send emails
Use a valid SMTP server or configure a relay
Instead of continuing to post these questions why don't you spend some time researching. You have been given enough information. I'll get you started[^]
No comment
|
|
|
|
|
your local machine is NOT an email server. ASP.NET and IIS don't just magically route emails around the world. You NEED an email server send an email.
health
|
|
|
|
|
Hi Guys,
I have installed Visual Studio 2010 with Framework 4.0. But when I try to add an Ajax control on a web form it convert into an xml and shows some code. Also there is no Bin folder in the solution explorer, therefore no ajax.dll file. Do I need to install ajax for VS2010 and Framework 4.0?
I would appreciate your feedbacks.
Thanks
|
|
|
|
|
Did you create web site or a web application?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
There is no bin folder displayed in the Solution Explorer view because it is not part of the solution. It is a generated folder.
How are you adding this AJAX control? Is it form the controls toolbox? Are you pasting some code?
No comment
|
|
|
|
|
It's a web based project. On the Default.aspx Design page I simply drag and drop the ajax TextBoxWaterMarkExtender control from the Toolbox on the web page. The Ajax controls are listed under the General tab within the ToolBox. I also have another tab Ajax Extensions which only have Pointer, ScriptManager, ScriptManagerProxy, Timer,UpdatePanel and UpdateProgress controls.As soon as I drop it creates bunch of xml codes like as follows
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1:WebControlToolboxItem id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/System.Web.UI.Design/System.Design%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db03f5f7f11d50a3a">
<Locked>true</Locked>
<Filter href="#ref-5"/>
<Bitmap href="#ref-6"/>
<AssemblyName href="#ref-7"/>
<Company id="ref-8">Microsoft</Company>
<DisplayName id="ref-9">TextBoxWatermarkExtender</DisplayName>
<Description id="ref-10"></Description>
<TypeName id="ref-11">AjaxControlToolkit.TextBoxWatermarkExtender</TypeName>
<DependentAssemblies href="#ref-12"/>
<PropertyNames href="#ref-13"/>
<ToolData id="ref-14"><{0}:TextBoxWatermarkExtender runat="server"></{0}:TextBoxWatermarkExtender></ToolData>
<PersistChildren>0</PersistChildren>
</a1:WebControlToolboxItem>
<SOAP-ENC:Array id="ref-5" SOAP-ENC:arrayType="a2:ToolboxItemFilterAttribute[2]" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.ComponentModel/System%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<item href="#ref-15"/>
<item href="#ref-16"/>
</SOAP-ENC:Array>
<a3:Bitmap id="ref-6" xmlns:a3="http://schemas.microsoft.com/clr/nsassem/System.Drawing/System.Drawing%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db03f5f7f11d50a3a">
<Data href="#ref-17"/>
</a3:Bitmap>
<a4:AssemblyName id="ref-7" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<_Name id="ref-18">AjaxControlToolkit</_Name>
<_PublicKey href="#ref-19"/>
<_PublicKeyToken xsi:null="1"/>
<_CultureInfo>127</_CultureInfo>
<_CodeBase id="ref-20">file:<_Version href="#ref-21"/>
<_HashAlgorithm xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SHA1</_HashAlgorithm>
<_HashAlgorithmForControl xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">None</_HashAlgorithmForControl>
<_StrongNameKeyPair xsi:null="1"/>
<_VersionCompatibility xsi:type="a6:AssemblyVersionCompatibility" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SameMachine</_VersionCompatibility>
<_Flags xsi:type="a4:AssemblyNameFlags" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">17</_Flags>
<_HashForControl xsi:null="1"/>
</a4:AssemblyName>
<SOAP-ENC:Array id="ref-12" SOAP-ENC:arrayType="a4:AssemblyName[4]" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<item href="#ref-22"/>
<item href="#ref-23"/>
<item href="#ref-24"/>
<item href="#ref-25"/>
</SOAP-ENC:Array>
<SOAP-ENC:Array id="ref-13" SOAP-ENC:arrayType="xsd:string[8]">
<item id="ref-26">Filter</item>
<item id="ref-27">Bitmap</item>
<item id="ref-28">AssemblyName</item>
<item id="ref-29">Company</item>
<item id="ref-30">DisplayName</item>
<item id="ref-31">Description</item>
<item id="ref-32">TypeName</item>
<item id="ref-33">DependentAssemblies</item>
</SOAP-ENC:Array>
<a2:ToolboxItemFilterAttribute id="ref-15" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.ComponentModel/System%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<filterType>Require</filterType>
<filterString id="ref-34">System.Web.UI</filterString>
<typeId id="ref-35">System.ComponentModel.ToolboxItemFilterAttributeSystem.Web.UI</typeId>
</a2:ToolboxItemFilterAttribute>
<a2:ToolboxItemFilterAttribute id="ref-16" xmlns:a2="http://schemas.microsoft.com/clr/nsassem/System.ComponentModel/System%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Db77a5c561934e089">
<filterType>Allow</filterType>
<filterString href="#ref-11"/>
<typeId xsi:null="1"/>
</a2:ToolboxItemFilterAttribute>
<SOAP-ENC:Array id="ref-17" xsi:type="SOAP-ENC:base64">iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAqdJREFUOE+Fk99PUnEYxo939n/UlVmpW9lIqwuXznQqWygqglsCLi3jgJrizIRUTFGsBDdBIWfq1lJTEHUg4q/MjfVz05wXunlVc2vNMHt6OTRIy3pvzs57vp/neb7vuxPBHFGNDSuIjDzG7Ox8Zfx+hqnXxEUcdZbru11rsFi2oW9dR+Bde28Zk05gfOw7hAIL12tqnIVM/hQFIhumppa4Hldzc2/Q1r6JsRd+TDh+oLJyCUrWAzvBw8+/oeqOC4WSXrAKOwyGLVRUeMDPMv0u8Brp6U6MDO9yrhOOfdjHg/DgwBdYrZ9gNG6jg+Dm5g3cLptGXGxxWCCQwuPxQVzgpMh7BO+jteU9UpJ1SL7SgPtaHzlvcrBS6cHJKFEYtpifQatZR7PuAx493MDYqB+G9lXIZT3k/Ao22wrKywcpvgv1mlWKvwKh0ArBtU5kZOjBsAoDtNp1uF37NIM9ir2LlBQ9BgbehlzM3YvIFhihrnkHpcqHYrkXWZnduHypFoyS7aAEH0MDC9w5IUGN/n5fSMBk8pJAF8X3oaR0GUXSeUgks0ikc0xbWx9yheMQ5gwhP28U1t7PqKxwg89vhNm8hK6ueeiaZiCV2n/BC+DxHuB8/C2cO1t6cJA3ikfQ+XiLW5WSnYFEbCNRC2QyR8iZz3+C2JjrB0GT0Yu7tbMUcZKDA9PWaNagVgfvHIy9QLE9yM2bJncWdXVDYRFd0xREor7QqqqrX4JVerk7lxIsJZjPp8lnjyIv340c4QTFvxkW6O1xI+2qDuUqN6qqFhEVVYCYM3JIi5ycc1KSHieOp5GzApmZ/fRU0SpphYfrYmIZ4uPLuA88ngCpqS0Q07Sjo8VcT6WaxulTMpSUdP8JHxYrLKwhMQUu8FQEBQX+WmD+L/av3/gnf6PhNPNJ5AEAAAAASUVORK5CYII=</SOAP-ENC:Array>
<SOAP-ENC:Array id="ref-19" xsi:type="SOAP-ENC:base64">ACQAAASAAACUAAAABgIAAAAkAABSU0ExAAQAAAEAAQCPK9TDyQ7IhUYTfpE2AHQf3d2SnwXQMtUv0WBriGCYmbP3N6DmiBxfO7oKGPxgUoeQ9lLmSkGGh/tTjDyG0yWGbW2wch4W30ixt8brsHvIg9ShGeherOERCEL1lxI4Xr5q4qAiniBe+OKEzsCiF84e7L1jwb9HR4VV/J42rx7xsw==</SOAP-ENC:Array>
<a5:Version id="ref-21" xmlns:a5="http://schemas.microsoft.com/clr/ns/System">
<_Major>1</_Major>
<_Minor>0</_Minor>
<_Build>10301</_Build>
<_Revision>0</_Revision>
</a5:Version>
<a4:AssemblyName id="ref-22" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<_Name id="ref-36">AjaxControlToolkit</_Name>
<_PublicKey href="#ref-37"/>
<_PublicKeyToken xsi:null="1"/>
<_CultureInfo>127</_CultureInfo>
<_CodeBase id="ref-38">file:<_Version href="#ref-39"/>
<_HashAlgorithm xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SHA1</_HashAlgorithm>
<_HashAlgorithmForControl xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">None</_HashAlgorithmForControl>
<_StrongNameKeyPair xsi:null="1"/>
<_VersionCompatibility xsi:type="a6:AssemblyVersionCompatibility" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SameMachine</_VersionCompatibility>
<_Flags xsi:type="a4:AssemblyNameFlags" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">17</_Flags>
<_HashForControl xsi:null="1"/>
</a4:AssemblyName>
<a4:AssemblyName id="ref-23" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<_Name id="ref-40">System.Web.Extensions</_Name>
<_PublicKey xsi:null="1"/>
<_PublicKeyToken href="#ref-41"/>
<_CultureInfo>127</_CultureInfo>
<_CodeBase xsi:type="xsd:anyType" xsi:null="1"/>
<_Version href="#ref-42"/>
<_HashAlgorithm xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SHA1</_HashAlgorithm>
<_HashAlgorithmForControl xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">None</_HashAlgorithmForControl>
<_StrongNameKeyPair xsi:null="1"/>
<_VersionCompatibility xsi:type="a6:AssemblyVersionCompatibility" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SameMachine</_VersionCompatibility>
<_Flags xsi:type="a4:AssemblyNameFlags" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">None</_Flags>
<_HashForControl xsi:null="1"/>
</a4:AssemblyName>
<a4:AssemblyName id="ref-24" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<_Name id="ref-43">System.Web</_Name>
<_PublicKey xsi:null="1"/>
<_PublicKeyToken href="#ref-44"/>
<_CultureInfo>127</_CultureInfo>
<_CodeBase xsi:type="xsd:anyType" xsi:null="1"/>
<_Version href="#ref-45"/>
<_HashAlgorithm xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SHA1</_HashAlgorithm>
<_HashAlgorithmForControl xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">None</_HashAlgorithmForControl>
<_StrongNameKeyPair xsi:null="1"/>
<_VersionCompatibility xsi:type="a6:AssemblyVersionCompatibility" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SameMachine</_VersionCompatibility>
<_Flags xsi:type="a4:AssemblyNameFlags" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">None</_Flags>
<_HashForControl xsi:null="1"/>
</a4:AssemblyName>
<a4:AssemblyName id="ref-25" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">
<_Name id="ref-46">mscorlib</_Name>
<_PublicKey xsi:null="1"/>
<_PublicKeyToken href="#ref-47"/>
<_CultureInfo>127</_CultureInfo>
<_CodeBase xsi:type="xsd:anyType" xsi:null="1"/>
<_Version href="#ref-48"/>
<_HashAlgorithm xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SHA1</_HashAlgorithm>
<_HashAlgorithmForControl xsi:type="a6:AssemblyHashAlgorithm" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">None</_HashAlgorithmForControl>
<_StrongNameKeyPair xsi:null="1"/>
<_VersionCompatibility xsi:type="a6:AssemblyVersionCompatibility" xmlns:a6="http://schemas.microsoft.com/clr/ns/System.Configuration.Assemblies">SameMachine</_VersionCompatibility>
<_Flags xsi:type="a4:AssemblyNameFlags" xmlns:a4="http://schemas.microsoft.com/clr/ns/System.Reflection">None</_Flags>
<_HashForControl xsi:null="1"/>
</a4:AssemblyName>
<SOAP-ENC:Array id="ref-37" xsi:type="SOAP-ENC:base64">ACQAAASAAACUAAAABgIAAAAkAABSU0ExAAQAAAEAAQCPK9TDyQ7IhUYTfpE2AHQf3d2SnwXQMtUv0WBriGCYmbP3N6DmiBxfO7oKGPxgUoeQ9lLmSkGGh/tTjDyG0yWGbW2wch4W30ixt8brsHvIg9ShGeherOERCEL1lxI4Xr5q4qAiniBe+OKEzsCiF84e7L1jwb9HR4VV/J42rx7xsw==</SOAP-ENC:Array>
<a5:Version id="ref-39" xmlns:a5="http://schemas.microsoft.com/clr/ns/System">
<_Major>1</_Major>
<_Minor>0</_Minor>
<_Build>10301</_Build>
<_Revision>0</_Revision>
</a5:Version>
<SOAP-ENC:Array id="ref-41" xsi:type="SOAP-ENC:base64">Mb84Vq02TjU=</SOAP-ENC:Array>
<a5:Version id="ref-42" xmlns:a5="http://schemas.microsoft.com/clr/ns/System">
<_Major>1</_Major>
<_Minor>0</_Minor>
<_Build>61025</_Build>
<_Revision>0</_Revision>
</a5:Version>
<SOAP-ENC:Array id="ref-44" xsi:type="SOAP-ENC:base64">sD9ffxHVCjo=</SOAP-ENC:Array>
<a5:Version id="ref-45" xmlns:a5="http://schemas.microsoft.com/clr/ns/System">
<_Major>2</_Major>
<_Minor>0</_Minor>
<_Build>0</_Build>
<_Revision>0</_Revision>
</a5:Version>
<SOAP-ENC:Array id="ref-47" xsi:type="SOAP-ENC:base64">t3pcVhk04Ik=</SOAP-ENC:Array>
<a5:Version id="ref-48" xmlns:a5="http://schemas.microsoft.com/clr/ns/System">
<_Major>2</_Major>
<_Minor>0</_Minor>
<_Build>0</_Build>
<_Revision>0</_Revision>
</a5:Version>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
|
|
|
|
|
First, it was unnecessary to post all of this.
Second, are you sure you are using the toolbox and not a snippet that has been added. If yes, then try to delete the toolbox items and recreate. You can add toolbox item by dragging an assembly onto it.
No comment
|
|
|
|
|
Thanks for replies.
Will you be able to tell me where do I find the assembly or file which I need to ad again to the toolbox? A step by step guide will be very very helpful to me.
Thanks
|
|
|
|
|
|
Hi,
How to insert a bulk data from a datatable or dataset or datagrid into database in a single click.
Thankyou
YPKI
|
|
|
|
|
Add all rows to the datatable. Then use sqlbulkcopy.It inserts all the records into database table in one shot.
SqlConnection destinationConnection = new SqlConnection(strConnection);
destinationConnection.Open();
SqlBulkCopy bulkCopy = new SqlBulkCopy(destinationConnection );
bulkCopy.DestinationTableName = "destination";
bulkCopy.WriteToServer(yourDatatable);
destinationConnection .Close();
|
|
|
|
|
Hi,
How to insert a bulk data from a datatable or dataset or datagrid into database in a single click.
Thankyou
YPKI
|
|
|
|
|
You've asked the same question twice - a big no-no! Delete one of them.
In the meantime what have you already tried/researched for yourself?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hi all i have binded data with gridview in presention point view it is working but while inserting the data to DB and iam traversing the girdview iam getting the index missing . please guide me where iam doing wrong
DataTable dataTable = new DataTable();
dataTable.Columns.Add(new DataColumn("StudentID", Type.GetType("System.String")));
dataTable.Columns.Add(new DataColumn("StudentName", Type.GetType"System.String")));
dataTable.Columns.Add(new DataColumn("MajorName", Type.GetType("System.String")));
dataTable.Columns.Add(new DataColumn("StudenMarks", Type.GetType("System.Int16")));
dataTable.Rows.Add(new string[] { "1","Student1","English"});
dataTable.Rows.Add(new string[] {"2", "Student2","English"});
dataTable.Rows.Add(new string[] { "3","Student3","Hindi"});
dataTable.Rows.Add(new string[] { "4", "Student4","Hindi"});
dataTable.Rows.Add(new string[] { "5", "Student4","Hindi"});
GridView1.DataSource = dataTable;
GridView1.DataBind();
AND my gridview looks like the below
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="false" onrowdatabound="GridView1_RowDataBound"
="" ondatabound="GridView1_DataBound">
<columns>
<asp:boundfield datafield="StudentID" headertext="Student ID">
<asp:boundfield datafield="StudentName" headertext="Student Name">
<asp:templatefield headertext="Major Name">
<itemtemplate>
<asp:label id="lblTypeName" runat="server" text="<%# Eval("MajorName") %>">
<asp:templatefield headertext="Marks">
<itemtemplate>
<asp:textbox id="txtMarks" runat="server" class="calculate" onkeyup="calculate()"
="" width="95%">
<asp:templatefield headertext="Sub-Total">
<itemtemplate>
<asp:label id="lblSubTotal" runat="server" class="SubTotal">
And on Row Data bound event i have the below code
string tmpCategoryName = string.empty;
protected void GridView1_RowDataBound (object sender, GridViewRowEventArgs e)
{
// If the current row is a DataRow (and not a Header or Footer row), then do stuff.
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView drv = (DataRowView)e.Row.DataItem;
if (tmpCategoryName != drv["MajorName"].ToString())
{
tmpCategoryName = drv["MajorName"].ToString();
// Get a reference to the current row's Parent, which is the Gridview (which happens to be a table)
//Table tbl = e.Row.Parent as Table;
Table tbl = e.Row.Parent as Table;
if (tbl != null)
{
GridViewRow row = new GridViewRow(-1, -1, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
// Span the row across all of the columns in the Gridview
cell.ColumnSpan = this.grdProduction.Columns.Count;
cell.Width = Unit.Percentage(100);
cell.Style.Add("font-weight", "bold");
cell.Style.Add("text-align", "center");
HtmlGenericControl span = new HtmlGenericControl("span");
span.InnerHtml = "(" + tmpCategoryName + ")";
cell.Controls.Add(span);
row.Cells.Add(cell);
tbl.Rows.AddAt(tbl.Rows.Count - 1, row);
}
}
} }
OUTPUT while getting the data from Gridview
100 1 StudentName1
2
200 3 StudentName 2
300 4 StudentName 3
400 5 StudentName 4
but when iam going to insert the data from gridview to Database on button click iam getting the Invalid data index missing ( Invalid data entry as well)
Regards,
|
|
|
|
|
"Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index" in datagrid1 after clicking the data
any one can help me to sort out
rizvan sivally
|
|
|
|
|
sheemap wrote: any one can help me to sort out
Of course I can. Oh, wait, telepathic powers waning... can't quite make out what you need...
You need to be a wee bit more specific - not enough to properly assess what you need though this[^] might point you in the right direction.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
After selecting what data you are getting this exception..?? show your code..
with regards
Karthik Harve
|
|
|
|
|
share your code.
When I face this problem,it is due to
I have two gridviews
and on click of second gridview linkbutton, I was using First gridview index.Thats the mistake.
FOr Gridview2 I was used
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = GridView1.Rows[index];
so ckeck for same.
|
|
|
|
|
show data of table1 of datagrid1 to datagrid2
how this is possible
rizvan sivally
|
|
|
|
|
make it clear to understand,so that we can give you an appropriate solution..
|
|
|
|