|
Hi
1.Click on smart tag of grid
2. Edit columns
3. Add command feild.
4.Click ok.
5.Click on smart tag of grid
6.Select edit columns
7.Select the button added
8.Remove button and add a image button
9.Go to edit templates
10. give image url.
hopes this will help.
if worked out please give me a message.
mallika
|
|
|
|
|
Sorry friend,
I think u didn't get my prob. Actually i've stored no. of images and their corresponding infos. in my database now i want to display those images in datagrid. So i'm using the template of the datagrid to show the images ...... but i donot know how to do it ......
|
|
|
|
|
Hi,
I have installed asp.net 2.0 and 1.0 on my pc in C drive. I have a service pack 4 in my pc. When I was debugging the web application in 2.0 it was debug fine but when I was trying to debugging the web application in 1.0 it gives message as-----Unable to start debugging on the web server.
Can any one give me solution for this
|
|
|
|
|
swami samarth wrote: I have installed asp.net 2.0 and 1.0 on my pc in C drive
could u kindly explain in details ????
Thanks in Advance !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
check whether your IIS is configured to use Integrated Windows Authentication.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Check this...[^]
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi Friends...
i am working on a webapplication in which i have to create pdf file using itextsharp(must as customer want to use this only). here i will have a gridview which is not databound, not have any column at design time. on page load only i will create a datatable based on some data and bind it to gridview.
after this i need to do formatting of some specific rows in the girdview. this formatting will use pre tag with some attributes like font-family, size, style. so while displaying the gridview after page load some rows of gridview will have specific formatting tags in it's cell's text.
on click of a button i need to create a pdf file using itextsharp. i am able to create pdf only problem is all formatting tags are appearing in file, they are not being replaced with thier html meaning.
can anybody help me to sort it out? please it's very much required at this time...
below is the function to which i am passing a datatable dt, which is nothing but data contained in grid stored into table... also a string headerText, which will come on top of page and will show some note text.
private void CreateSavePdf(DataTable dt, string headerText)
{
// where to store the file
string pdfFileName = "D:\\Report.pdf";
Document document = new Document(PageSize.A4.Rotate(), 50, 50, 50, 50);
PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(pdfFileName, FileMode.Create));
document.Open();
Phrase headerPhrase = new Phrase(headerText, FontFactory.GetFont("Verdana", 24));
HeaderFooter header = new HeaderFooter(headerPhrase, false);
header.Border = Rectangle.NO_BORDER;
header.Alignment = Element.ALIGN_LEFT;
document.Header = header;
document.Add(headerPhrase);
HeaderFooter footer = new HeaderFooter(new Phrase("Page "), true);
footer.Border = Rectangle.NO_BORDER;
footer.Alignment = Element.ALIGN_CENTER;
document.Footer = footer;
int numColumns = dt.Columns.Count;
PdfPTable datatable = new PdfPTable(numColumns);
datatable.DefaultCell.Padding = 3;
datatable.WidthPercentage = 100; // percentage
datatable.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
datatable.DefaultCell.BorderWidth = 1;
datatable.DefaultCell.GrayFill = 0.7f;
foreach (DataColumn column in dt.Columns)
{
string columnName = column.ColumnName;
Phrase phrase = new Phrase(columnName, FontFactory.GetFont("Arial", 8, Font.BOLD));
datatable.AddCell(phrase);
}
datatable.HeaderRows = 1;
foreach (DataRow row in dt.Rows)
{
foreach (DataColumn column in dt.Columns)
{
string columnName = column.ColumnName;
datatable.DefaultCell.BackgroundColor = Color.WHITE;
Phrase phrase = new Phrase(row[columnName].ToString(), FontFactory.GetFont("Arial", 8));
datatable.AddCell(phrase);
}
}
document.Add(datatable);
document.Close();
}
-- modified at 7:54 Saturday 6th October, 2007
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
|
|
|
|
|
How to make a msgbox in asp.net? Thanks
|
|
|
|
|
You need to do it in javascript, with an alert statement
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
U can easily do it using JavaScript .....
<script language="javascript" type="text/javascript">
function Button1_onclick()
{
alert("Hi This is a message box");
}
</script>
-------------
<input id="Button1" style="z-index: 100; left: 128px; position: absolute; top: 112px"
type="button" value="button" language="javascript" <b>onclick="return Button1_onclick()</b>" />
u can also use VB Script ..... for the same, but on that case u have use Msgbox("Your message" instaed of alert!!!
Good luck !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Abhijit@CodeProject wrote: u can also use VB Script ..... for the same, but on that case u have use Msgbox("Your message" instaed of alert!!!
And of course, this only works in IE
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Nine Tails wrote: How to make a msgbox in asp.net?
Private sub MsgBox(ByVal Msg As String)
Dim strScript As String = ""
strScript += "<script language=JavaScript>"
strScript += "alert('" & Msg & "');"
strScript += "</script>"
Response.Write(strScript)
End sub
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
|
|
Abhijit@CodeProject wrote: just confirm me one thing that weather it can be called by a html control or not ????
HTML controls run on the client-side and Server Controls runs on the Server-Side. The VB.NET function which I gave to alert a message will run on the server-side. But the Statement Response.Write will write the script to the Client and it alerts a message.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
That i got!!! i just want to know,,,, i have a button,
can we call that function from click on this button ???
Happy Programming
-----
Abhijit
|
|
|
|
|
why do you want to complicate the things?
To alert a message on the click of HTML button...
<.input type="button" value="MsgBox" 0nclick="alert('This is a MsgBox Sample.');">
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Thanks
Happy Programming
-----
Abhijit
|
|
|
|
|
From any control, you can call it from any client side event you like, but the code is simple enough that you'd do better IMO to just inline it, so add the alert call to the event, instead of calling such a simple function.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Christian Graus wrote: "you'd do better IMO to just inline it, so add the alert call to the event, instead of calling such a simple function "
could u kindly explain me in details ???
And also inform me how can i call that function from a html button control???
Thanks in Advance !!!
Happy Programming
-----
Abhijit
|
|
|
|
|
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanks a lot !
Happy Programming
-----
Abhijit
|
|
|
|
|
there is a Use Simple file sharing Recommended (after unchecking this option , i will be given the security tab for every file and folder) in the folder option > view in the window explorer.which is appearing in the drived other then the frived where the operating system is not installed.
Example my operating system is installed in c drive.no i am not getting the security tab for the file or folder in c drive.
Actually i have to access the database which is residing in th c drive , and i am unable to provide the access permission to my database
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Hi,
Some times any of the webpage does not behave correctly, I was asked to do IISRESET. What does this do actually?
Thanks & Regards,
Rakesh
Rakesh
|
|
|
|
|
stops IIS and starts it again.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|