|
I have two machine
1.machine A
2.machine B
i created one txtbox in machine A
i created one table in pubs database in machine b
if i enter value in machine A ,it will store machine B table..
this is query.u understand now
|
|
|
|
|
|
Hi,
I want to display some text inplace of image if image is not available, when we are retrieving image from database.
anyone help me
|
|
|
|
|
Hi,
What is the problem.
Where you are displaying image.
Can you figure out problem more Specifically..
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi,
I want to display that image in one form
Just i want to display
Image not available
if there is no record in the database
is it clear?
|
|
|
|
|
hi
There is a property for asp Image control called altername text.
This text will display if no image url specified.
So set the url for ur image if it is availble only.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi,
But it is showing inside the image.
I want to display outside
|
|
|
|
|
Write a function that checks the database value is empty. If empty then replace that with another image not found image. If you are binding data on datagrid then use itemdatabound event for setting the image.
private string GetImagePath(string DbValue)
{
string strReturn = string.Empty;
if ( DbValue == "" ){
strReturn = "YourNotFoundImage.gif";
}
else
strReturn = "CorrrectImage.gif";
}
Call a function like this when data is binding from DB
|
|
|
|
|
Hi,
Thanks for u'r reply.
But I am storing image as binary format in sql & retrieving like this .
see this code
Do While (myDataReader.Read())
Response.ContentType = myDataReader.Item(1)
Response.BinaryWrite(myDataReader.Item(0))
Loop
So How can i check recordcount
|
|
|
|
|
Hi,
How you are checking image available or not the same method you can use
in navaneeth's example...
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
What about converting binary to string and passing to the function ? Try This Link[^]
|
|
|
|
|
Hi
There is one attribute called as 'ALT' tag to describe your image. This means, that the text is meant to be used when the image is not visible on the page.
Hope you got it.
Harini
|
|
|
|
|
Hi
I hava problem regarding crystalreports
My problem is how to genarate crystal report form two tables which has regid as comman coloums
I am using .net2.0 ,sqlsever2005
came out of hardwork
|
|
|
|
|
Hi,
You can create a "view" in sql server 2005 from 2 tables.
And use that view to create the report.The view here will act as a single table.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
I am new to .net could plse suggest me any example so that ia can manage my self
came out of hardwork
|
|
|
|
|
Hi,
I dont know websites explaining SQL server views.
I think you know how to create crystal reports from tables.
So...
1.Open MS Sql Server Management Studio
2.Navigate to your database
3.There will be a treenode "Views" right click on it.
4.Select New View
3.Select the tables that you want to include.press Add
Give your condition for the view.
dont think it is difficult.try yourself it is very very easy...
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
HI
Thanku I created a view how to use it form userside or the query which is generated is to be used
came out of hardwork
|
|
|
|
|
Hi
Oh... good You are Fast...
The view you created will act like a table.
No need to use the query generated.
Save the view with a name.
then eg:
SELECT * FROM MyView
will return all the data from the view.
I think now you are femiliar withit...
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi,
I have three questions with me.
1) I wish to display a Text in a GridView column. (ie) TextIf the Text is more than Two lines, I wish to display it in the format like the below link.
msn shopping - Products Display[^]
2) Also, How to display the same in a popup while mouse over it?
3) Also, I wish to display the URL in a GridView column (ie) Anchor Tag hereIf the URL width is above the certain length, I wish to display it like
URL... (Few dots at the end) [NOT the whole URL displayed here]
I hope all the questions having similar requirement. Please help me to get start.
-- modified at 2:45 Wednesday 23rd May, 2007
Regards,
Jay
|
|
|
|
|
Hi,
Jay_se wrote: msn shopping - Products Display[^]
It is not a link.So I cannot find the format you want.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Pls, have a look at the question at the Top. [Modified]
Regards,
Jay
|
|
|
|
|
Hi All,
I have a grid view which is displaying data from a dataset. i have a button on the page where grid view is there and on click of the button, all gridview data should be dispplayed in excel file opened in new window. please tell me how to do this?
Akhilesh Singh
|
|
|
|
|
This code is collected from "http://forums.asp.net/t/956392.aspx"
Export to Excel in ASP.NET is a very common feature, which I'm sure everyone who has worked in ASP.NET would have had the chance to implement.
Whenever we choose the Export to Excel option from our Application, a dialog box pops us with the option to Open or to Save.
By chance if the user checks off the option "Always ask before opening this type of file" that is shown in the dialog box, from next time the user will not be able to see the dialog box. Instead, the excel file opens up in the same window.
To set back this option, the following steps can be followed:
1. Go to Windows Explorer.
2. On the Tools menu, click Folder Options, and then click on the File Types tab.
3. From the Registered file types list box, select the XLS extension, and then click Advanced.
4. In the Edit File Type dialog box, set the Confirm open after download to selected.
5. Make sure the Browse in same window option is not selected, and then click OK.
The above steps will make sure that we get the dialog box as shown above. However, since this is an option set at the client computer, these steps cannot be mandated to be followed in every computer that browses the application.
So, from the code level, we must make sure that the excel file is opened in a separate window. One possible option for this is to Save the file to the web server, and then open the file in a separate window.
The code for this is given below:
private void ExportToExcel(DataGrid dgExport)
{
try
{
string strFileName = String.Empty, strFilePath= String.Empty;
strFilePath = Server.MapPath(@"../Excel/") + "ExcelFileName" + ".xls";
if (File.Exists(strFilePath))
{
File.Delete(strFilePath);
}
System.IO.StringWriter oStringWriter =new StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);
StreamWriter objStreamWriter;
string strStyle =@" .text { mso-number-format:\@; }
";
objStreamWriter = File.AppendText(strFilePath);
dgExport.RenderControl(oHtmlTextWriter);
objStreamWriter.WriteLine(strStyle);
objStreamWriter.WriteLine(oStringWriter.ToString());
objStreamWriter.Close();
string strScript = "window.open('../Excel/" + "ExcelFileName" +
".xls','dn','width=1,height=1,toolbar=no,top=300,left=400,right=1,
scrollbars=no,locaton=1,resizable=1');";
if(!Page.IsStartupScriptRegistered("clientScript"))
{
Page.RegisterStartupScript("clientScript", strScript);
}
}
catch(Exception)
{
//Handle Exception
}
}
In the above method, the file is saved to the Web Server inside the folder "Excel". Of course, this folder must have write permissions for the user. But it will definitely ensure that the excel file is opened in a new window in the client computer.
**** I think it helps U ****
|
|
|
|
|
Try This:
#Region "Export To Excel Button Click Event"
Protected Sub cmdExportToExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdExportToExcel.Click
Dim sw As StringWriter = New StringWriter()
Dim htw As HtmlTextWriter = New HtmlTextWriter(sw)
Try
Dim ml_strFileName As String = ml_strSaveFileName
Dim attachment As String = "attachment; filename=" & ml_strFileName & ".xls"
Response.ClearContent()
Response.AddHeader("content-disposition", attachment)
Response.ContentType = "application/ms-excel"
Gridview1.RenderControl(htw)
Response.Write(sw.ToString())
Response.End()
Catch ex As Exception
Finally
If Not sw Is Nothing Then
If Not htw Is Nothing Then
sw = Nothing
htw = Nothing
End If
End If
End Try
End Sub
#End Region
#Region "VerifyRenderingInServerForm"
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
#End Region
Hope this helps u???
|
|
|
|
|
I'm looking for an easy way to synchronize application caches on different front-end servers of a web farm. Any way to do distributed application data caching in .NET?
thx!
|
|
|
|