|
can you edit in the datagrid? yes. What are you trying to edit?
Yusuf
|
|
|
|
|
Just I Click the Check box on the header text then to Select all the checkboxs in the below columns on the datagrid
|
|
|
|
|
OK firslty reply to my post below and not start a new one
try this in regards to your post:
http://aspnet.4guysfromrolla.com/articles/053106-1.aspx
We are not a Code Charity
|
|
|
|
|
Hi,
I am searching on keyword like "Home Appliance System".
Now it is searching.
But I also want when I enter "Home System" then it will also search for the same that is display using Home Appliance System.
How can I do?
Thanks
|
|
|
|
|
We have no idea what you're talking about. I assume you're saying that you are doing a text search of a SQL database, and you need to break up your string so instead of searching for LIKE '%Home System%' you search for LIKE '%Home%System%'
Use string.Replace to replace the space with a %. And, try to ask intelligent questions that don't need to be decoded.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
Could any one let me know how to post data to a certain URL using Post and get method?
Thank you.
|
|
|
|
|
Surely just specifiy a url in your form??
We are not a Code Charity
|
|
|
|
|
Thank you very much for your email.Can you please give me an example please?
Your help is much appreciated.
|
|
|
|
|
http://www.w3schools.com/TAGS/tag_form.asp
We are not a Code Charity
|
|
|
|
|
Hi,
What should one consider when developing a high volum transaction web site.
i.e. a site that gets hit quite alot.
Something like, caching, ajax, etc?
Thanks
|
|
|
|
|
Not really the langauge more the server it is running on, can it cope, the line can it accept that much traffic
We are not a Code Charity
|
|
|
|
|
How to set a checkbox in Header Text on the datagrid
|
|
|
|
|
you want a checkbox in the header? why?
We are not a Code Charity
|
|
|
|
|
<headertemplate>
<asp:checkbox id="chkSelect" runat="server">
Jintal Patel
|
|
|
|
|
Hi
I'm trying to use Microsoft report viewer, I have managed to get it working locally.
Now I want to try it on the server, however in the article below it seems to suggest that i will need
SQL Server 2005 Reporting Services report server.
I currently use SQL server 2003.
Does that mean I cannot use the report service until I upgrade to sql 2005?
thanks
We are not a Code Charity
|
|
|
|
|
How to reduce the row height in the datagird
|
|
|
|
|
<itemstyle height="">
We are not a Code Charity
|
|
|
|
|
I am developing a web site that will be used by multiple clients. Each client will have their own SQL Server 2000 DB that will contain their membership/role/application data. The client will be identified when they access the website and I want to change the connectionStringName of the membership provider for the Login/Forgot Password/Change Password objects to the appropriate DB for that client. I would really like to use code-behind to instance an (SQL) membership provider object with the desired connectionStringName and assign that object as the MembershipProvider of the login object to select the desired DB. I have not found a way to do this or to be able to create a reference to the default membership provider to be able to change the connectionStringName value. Is there a way to accomplish what I want to do without having to set up a custom membership provider for each client in the Web.config just to be able to change the connectionStringName for the data source?
|
|
|
|
|
One way I think you could do it, is to have a dropdownlist in which they choose their role i.e. which client they are and then depending on that you assign the correct connection string for the option chosen in the dropdownlist.
does that make sense?
We are not a Code Charity
|
|
|
|
|
Hi Friends,
I m doing crystal report in asp.net2.0 using c#,i have written the code for crystal report dynamically getting the database connection from web.config file and i have created the crystal report manually making the database connection mapping the stored procedure.I m getting the output correctly.The problem is if i need to change the database server name means i should change only in web.config file,but i have given the connection for crystal report in code behind and crystal report manually.When i change the database server name in web.config file its not getting the effect only when i connect crystal report manually its getting connected.Sorry for long comments here is the coding for database connection.Please help me to solve the solution
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
string from = "";
string id = "";
string to = "";
string mode = "";
from =Request.QueryString["FromDate"];
id = Request.QueryString["id"];
to = Request.QueryString["toDate"];
mode =Request.QueryString["mode"];
ReportDocument rd = new ReportDocument();
rd.Load(Server.MapPath("TourOperator.rpt"));
rd.SetParameterValue(0, mode);
rd.SetParameterValue(1, id);
rd.SetParameterValue(2, from);
rd.SetParameterValue(3, to);
GetServerName(rd);
Session["torRep"] = rd;
foreach (CrystalDecisions.CrystalReports.Engine.ReportObject obj in rd.ReportDefinition.ReportObjects)
{
if (obj.Name == "txtfromdate")
{
((TextObject)obj).Text = from;
}
if(obj.Name=="txttodate")
{
((TextObject)obj).Text = to;
}
}
if (rd.Rows.Count > 0)
{
CrystalReportViewer1.Visible = true;
CrystalReportViewer1.ReportSource = rd;
CrystalReportViewer1.DataBind();
}
else
{
CrystalReportViewer1.Visible = false;
ltl.Text = "<b><font color='red'>No Records Found</font></b>";
}
}
else
{
CrystalReportViewer1.ReportSource = (ReportDocument)Session["torRep"];
CrystalReportViewer1.DataBind();
}
}
private void GetServerName(ReportDocument rep)
{
try
{
ConnectionInfo cinfo = new ConnectionInfo();
TableLogOnInfo tinfo = new TableLogOnInfo();
string cStr = ConfigurationManager.ConnectionStrings["sqlcon"].ConnectionString;
cinfo.ServerName = cStr.Split(';')[0].Split('=')[1];
cinfo.DatabaseName = cStr.Split(';')[3].Split('=')[1];
cinfo.UserID = cStr.Split(';')[1].Split('=')[1];
cinfo.Password = cStr.Split(';')[2].Split('=')[1];
foreach (CrystalDecisions.CrystalReports.Engine.Table objTable in rep.Database.Tables)
{
tinfo = objTable.LogOnInfo;
tinfo.ConnectionInfo = cinfo;
objTable.ApplyLogOnInfo(tinfo);
}
}
catch (Exception ex)
{
throw ex;
}
}
Thanks in Advance
|
|
|
|
|
Hello Friends,
Error: I am not able to load the image on the page every time I get an Red X mark
Question: Can anyone help me identifying the error from the code that I am using to retrieve the image from the SQLSERVER2005 on to an ASP.NET PAGE in C#
Code for DisplayPhoto.aspx.cs:
protected void Page_Init(object sender, EventArgs e)
{
SqlConnection SqlConnection1 = new SqlConnection();
string connstring = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlConnection1.ConnectionString = connstring;
SqlConnection1.Open();
if (Request.QueryString["id"] != null)
{
int id;
if (Int32.TryParse(Request.QueryString["id"], out id))
{
Response.Clear();
Response.ContentType = "image/jpeg";
System.Drawing.Image image1 = RetrieveImage(id);
image1.Save(Response.OutputStream, ImageFormat.Jpeg);
}
}
}
private System.Drawing.Image RetrieveImage(int photoId)
{
System.Drawing.Image image2 = null;
System.Data.SqlClient.SqlCommand cmd_selectphoto = new System.Data.SqlClient.SqlCommand();
cmd_selectphoto.Connection = SqlConnection1;
cmd_selectphoto.CommandType = CommandType.Text;
cmd_selectphoto.CommandText = "SELECT PhotoImage FROM Photo WHERE PhotoID = 5";
//cmd_selectphoto.Parameters.AddWithValue("3", photoId);
byte[] imageData = (byte[])cmd_selectphoto.ExecuteScalar();
MemoryStream memStream = new MemoryStream(imageData);
image2 = System.Drawing.Image.FromStream(memStream);
return image2;
}
Code for DisplayPhoto.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DisplayPhoto.aspx.cs" Inherits="DisplayPhoto" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<%-- <link href="Admin.css" type="text/css" rel="stylesheet" />--%>
<title>Display Photo</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<center>
<table width="80%" style="height: 62px" cellspacing="0" cellpadding="0" border="0"
class="table">
<tr>
<td>
<asp:Image ID="image1" runat="server" />
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
|
|
|
|
|
To load an image, you need a file on disc. Or, you need to write a HTTP handler that returns the byte data, passing the image Id on the URL.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Christian,
I have a file on the disc and that code works perfectly. .I am able to load the image in the SQL SERVER2005. . My Question here is how to retrieve the image from SQL SERVER2005. I have used the code as mentioned if you can help me in identifying the error it would be so nice. .
|
|
|
|
|
Hi All,
Can any one tell me, how do we idenify that the database whose we are connected in a web application is MySql, SQL Express, .. etc.
Thanks in advance for solving my problem...
Brijendra
|
|
|
|
|
Hello,
I try to explain as best as I can what I'm trying to do:
1)I'm writing a web app using ASP.NET / FW 3.5 and LINQ to SQL.
2)I've got a table called Categories {id<pk>, description} and SubCategories {id<pk>,parentid<pk>, description}
3)I've got two gridview binded to the tables above with LinqDataSource (tried with a single data source and 2 different one)
Even if on db there's a relationship between Categories and SubCategories I can't find an easy way to have the second gridview (the subcategories one) binded to the first one. right now I'm doing the "binding" between the two manually, getting the selected row from first and digging to get the id, but I don't like it much, since sometimes category grid view loses the selectedrow property.
Is somewere an example or tutorial about how can I do it in the best way?
Thanks
Bests
|
|
|
|