|
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!
|
|
|
|
|
Hi there,
Some third party products can do that. Check out a tool called StateMirror.
|
|
|
|
|
hi all
i have file pg_dump.exe Export file
When i run cmd to this folder contain this file. After that i give argument is
pg_dump -i -h 127.0.0.1 -p 5432 -U postgres -d vietnamairlines -v " + '"' + @"C:\abc.backup" + '"';
click Enter
it show one Line Password:
i give my password and click Enter it Export my file to me.
I want implement this command on ASP.net (C# 2.0).
i have command :
string strPathFile = Server.MapPath(@"../cmd/pg_dump.exe");
MyProc.StartInfo.FileName = strPathFile;
MyProc.StartInfo.UseShellExecute = false;
MyProc.StartInfo.RedirectStandardError = false;
MyProc.StartInfo.RedirectStandardInput = false;
MyProc.StartInfo.RedirectStandardOutput = false;
MyProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
MyProc.StartInfo.Arguments = @" -i -h 127.0.0.1 -p 5432 -U postgres -d vietnamairlines -v " + '"' + @"C:\abc.backup" + '"';
MyProc.StartInfo.CreateNoWindow = true;
MyProc.StartInfo.Verb = "save";
MyProc.Start();
MyProc.WaitForExit();
How can i give Password to this Process ????
Some people give me this Line code put behind MyProc.Start();
MyProc.StandardInput.WriteLine("my password");
But it still not Ok !
Some body tell me ??????
|
|
|
|
|
I am prettysure it would need to go before the waitforexit, but you might need to pause for a second before you write it. So maybe something this would work:
MyProc.Start();
Threading.Thread.Sleep(1000);
StreamWriter myStreamWriter = MyProc.StandardInput;
myStreamWriter.WriteLine("my password");
myStreamWriter.Close();
MyProc.WaitForExit();
Hope that helps.
Ben
|
|
|
|
|
Environment.SetEnvironmentVariable("PGPASSWORD", "You Password");
Hope I have helped.
|
|
|
|
|
Hi! i want to use AJAX in OPERA but OPERA doesn't support XMLHttpRequest as a native script object or ActiveX Object. then what is the method for AJAX programming in OPERA WEB BROWSER?
Thanks & Regards,
SAMir Nigam,
Software Engineer,
STPL, Lucknow, India.
|
|
|
|
|
Voodoo ? Black magic ? If there's no XMLHttpRequest object, there can't be any AJAX, now can there ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Opera does support is natively, but only since version 9.
|
|
|
|
|
Hi,
I am geting the list attachments as comma seperated in a textarea or a multiline textbox. I want the attachments to be hyperlink so that i can click on any of the attachment in the textbox and open it. Jus like how it is shown in rediffmail or any other mailing system.
Can anybody help me out in this. If anyone has any code or link to any code then plz reply.
Thanks,
Riz
|
|
|
|
|
string[] str = TextArea.Text.Split(char.parse(","));
for(int i=0;i<=str.length - 1;i++){
}
|
|
|
|
|
Thanks for ur response
But how to make the comma seperated text as hyperlinks in a textbox?
If we have file1.txt, file2.txt, file3.txt in a textbox then i want all 3 files to be a hyperlink so that i can open them onclick.
Rajiya
|
|
|
|
|
Hi i have some textbox in my form,
In future,if i like to add some more textbox in that form,
How its possible to add like that textbox in my form?,
Example:
For one student marks i want to enter,
If he have 3 subjects, so i will give now 3 textbox,
In future it will become as a 5 subjects,
Then i want to include 2 more textbox in my form,
So how its possible?,
Magi
|
|
|
|
|
Hi
Do you want to add text boxes at runtime?
If yes
dim MyTxtBox as new TextBox
set watever properties you want using "MyTextBox."
Add MyTextBox to panel,placeholder or to ASP Tables or any other.
eg:
panel1.controls.add(MyTextBox)
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
I'm having problem in setting up the time-interval for my splash screen for a web application. How can i set this, to ensure the splash screen shows up even if application is loaded up faster than expected?
Jazz Morgan
|
|
|
|
|
If you have a form you call a splash screen, how are you closing it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
how to play the flash file in iframe? can it be done? i already can upload the file to a specific folder, but it is not show in the iframe which is let the user to select...can anybody help? thanks.
|
|
|
|
|
Hi,
It is possible to play flash file in iframe.
give
src="path of the flash file"
|
|
|
|