
sukhdev_ce
Members-
Content Count
11 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout sukhdev_ce
-
Rank
Newbie
- Birthday 01/03/1981
Profile Information
-
Location
New Delhi
-
How To Show Report Without Gridview In Asp.net
sukhdev_ce replied to rajkumarrajendran's topic in .NET
Hi!Simple you can use tables TAG of HTML code.define the tags in response.write in side the loop, read values from your Database and put it into the tables tag. like thisR.W("<Table border='1'>");for (r=0;r<Ds.Tables[0].Rows.Count;r++){R.W("<TR>");for (c=0;c<Ds.Tables[0].Columns.Count;c++){R.W("<TD>"+Ds.Tables[0].Rows[r][c].ToString()+"</TD>");}R.W("</TR>");}R.W("</Table>"); OK, Try your code like this. -
protected void Button1_Click(object sender, EventArgs e){SqlConnection con = new SqlConnection("Data Source=CMA-PC; Initial Catalog= master; Integrated Security=True");SqlDataAdapter da = new SqlDataAdapter("select * from aa1 where Journal_Name='" + DropDownList1.Text + "' AND Issue_No='" + TextBox6.Text + "'", con);DataSet ds = new DataSet();da.Fill(ds);if(ds.tables[0].Rows.count>0){GridView1.DataSource = ds;GridView1.DataBind();}else{GridView1.EmptyRowText="No Record found.";GridView1.DataSource=null;GridView1.DataBind();}it display all rows by conatining a table define in the Query with
-
ASP.NET website kicks me out when connecting programmatically
sukhdev_ce replied to gsingh2011's topic in .NET
Hi!Please Ensure that Session is Working, if Yes, the have the same problem then try Follwoing Steps1) Try This Functionality with Cache Variables same as using Session Variable. or2) Try this with HTTPCookies. or 3) Try this with Response.QueryString by Passing it with URL Like Respose.Write("Page.aspx?Value="+PassValue.Text); and Access it on second page("Page.aspx")Page_Load(){Page.Title=Response.QueryString["Value"];}if Same Problem, then you have to post the Full Code Here.B-Bye -
Hi!You Have use This MethodOleDBConnection COn= New OleDBConnection("ConectionStringPassed Here");Con.Open();SqlSTMT="Insert Into TableName(Field1,Field2) Values(' "+TextBox1.Tex+"',"'+TextBox2.Tex+"')";OleDBCommand Cmd= new OleDBCommand(SqlSTMT,COn);Cmd.ExcuteNonQuery();Your Record will be inserted.
-
Hi,YOu Have To Make the COnnection with Database UseingSqlConnection Con= new SqlCOnnection("Conection Strng");SqlDataAdapter Da= new ("SQL Query",Con);DataSet Ds= new DataSet();Da.Fill(Ds);GridView1.DataSource=Ds;GridView1.DataBind();the above part is the code behind filethe Design COde Part Is<asp:GridView Id="GridView1" runat="server"><AlternatingRowStyle BackColor="AliceBlue" BorderColor="ActiveBorder" BorderWidth="1" ForeColor="Azure" /></asp:GridView>i hope it may the solution of your problem.
-
Hi!;Open the Sql Server Enterprise Manager Window-> Sql Server Registration->Right CLick, Select Properties-> Click on Security Tab and THEN Choose Sql Server and Windows or else option as you Required.I hope it may Solve Your Problem.
-
Hi, Request: It Uses for Fetch the Values from the Form Objects or Variables which are requested by a client.Response: it is uses for to Get Response from the Server based upon a Client Request to the Server.
-
You Have to use if(!ispostback){DropDownList1.Items.add("ItemName");}it uses one time loading time only.
-
Dim n As IntegerFor n = 0 To 10 DropDownList1.Items.Add(n.ToString())Nextits a simple solution of your problem.
-
Hi, Prashantits very simple you use Session["SessionNameBased"] or Session[indexValueBased]here set the Session Using Session="Some Value"it returns Object tyep valuesWhile Retriveing Valuesvariable name = Session["Name"].ToString();Methods for to use the Sessions.