- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
10 Posted Topics
[B]yes jbisono is right.[/B] above this line GridView1.DataSource = ds you are missing this one adp.Fill(ds)
Add this code in web config file ... <connectionstring> <configSections> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> <section …
your delete query is not correct delete statement is:- DELETE FROM tablename WHERE LastName='name' AND FirstName='aneme' DELETE FROM table_name WHERE some_column=some_value
use this code i think your problem solve [COLOR="Green"]//this is function to generate your booking_no[/COLOR] Public Function login_id(ByVal str As String) As String Dim id As String Dim cmd As New SqlCommand("SELECT MAX(CONVERT(int, SUBSTRING(id,3,3)))+1 FROM tablename", con) If con.State = ConnectionState.Open Then con.Close() End If con.Open() Dim obj As [Object] …
use this code in default.aspx.cs In page load() { label.text="hello"; } or you want to use text color in label text use namespace ; using system.drawing; or rewrite above code like this In page load() { label.text="hello"; label.color=forecolor.red; } from Mind Bird Solutions <snipped>
[B]in grid view use textbox control like this:-[/B] <templatefiled> <itemtemplate>label<itemtemplate> <edittemplate>textbox<edittemplate> </templatefield> in textbox use this code [B] <asp:RegularExpressionValidator id="RegularExpressionValidator1" runat="server" ErrorMessage="Date must be in the form DD/MM/YYYY" ControlToValidate="tbDiaryDateDue" ValidationExpression="(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d" Display="Dynamic"></asp:RegularExpressionValidator>[/B] [B]<asp:RegularExpressionValidator id="RegularExpressionValidator2" runat="server" ErrorMessage="Date must be in the form D/M/YYYY" ControlToValidate="tbDiaryDateDue" ValidationExpression="([1-9]|[12][0-9]|3[01])[- /.]([1-9]|1[012])[- /.](19|20)\d\d" Display="Dynamic"></asp:RegularExpressionValidator>[/B]
using System.Web.Mail; MailMessage mm = new MailMessage(); mm.To = "mymail@gmail.com"; mm.From = "mymail@gmail.com"; mm.Subject = uxSubjectText.Text; string MESSAGE2 = "<html><body><div><table><tr><td>hiiiii</td></tr></table></div></body></html>" mm.Body = MESSAGE2; mm.BodyFormat = MailFormat.Html; mm.Priority = MailPriority.High; SmtpMail.SmtpServer = "smtp.gmail.com"; mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "maymail@gmail.com"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "password"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", "465"); mm.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true"); SmtpMail.Send(mm); plz solve this problem
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Show") { Button b = (Button)GridView1.Rows[int.Parse (e.CommandArgument.ToString())].Cells[1]. FindControl("Button1"); if (b.Text == "Show") { string custid = GridView1.DataKeys[int.Parse (e.CommandArgument.ToString())].Value.ToString(); SqlDataSource sds = (SqlDataSource)GridView1. Rows[int.Parse(e.CommandArgument.ToString())]. FindControl("SqlDataSource2"); GridView gv = (GridView)GridView1.Rows[int.Parse (e.CommandArgument.ToString())].FindControl("GridView2"); sds.SelectParameters[0].DefaultValue = custid; gv.Visible = true; b.Text = "Hide"; } else …
[B]use this code to get max number from table in asp.net [/B] [code] public string login_id(string str) { string id; SqlCommand cmd = new SqlCommand("SELECT MAX(CONVERT(int, SUBSTRING(id,3,3)))+1 FROM uploadebook", con); if (con.State == ConnectionState.Open) { con.Close(); } con.Open(); Object obj = cmd.ExecuteScalar(); if (obj.ToString() == "") { id = "Id1"; …
its simple just use session id as primary key and create new table in database as you want to create and use sql commamnd insert into table...
The End.