|
lv.SelectedItems[0].ToString()
Dont forget to specify the position of the columns using [0] even if you only have one columns the [0] is still used. Then so on if you have more than one columns [1],[2] etc
modified on Tuesday, August 23, 2011 12:35 PM
|
|
|
|
|
As another alternative; override the .ToString function of the class that you're stuffing in there (identified by the namespace and classname showing currently) and have it return a formatted string with the most interesting properties of the "this class", somewhat similar to the example below;
public override string ToString()
{
return string.Format("Class myClassName, id: {0}, name: {1}", this.someId, this.someName);
}
Overriding that method has the bonus-advantage you have a string-representation in the debugger for your object.
Bastard Programmer from Hell
|
|
|
|
|
We have a time card system that seems to be built on an older version of IE, we use something called ie7 to ie6 emulator. How can I write a more reliable app that will trick IE into thinking that its an older version but only enabled when accessing a specific URL when the time card site is visited?
I know normally that some web applications will not work based on the ie7 version when ever you visit a site, the site will just pick it up as an older version.
modified on Tuesday, August 23, 2011 8:49 AM
|
|
|
|
|
|
Almost but it is possible to make it in C#.NET and not in html or asp. The application we are currently using is found here : IE7_to_IE6_Emulator[^]
|
|
|
|
|
|
Hi guy's,
I have a project where, i have to convert a PDF file into image and then present those images in a flash book.
That flash Book must be dynamic i.e. the user uploads the PDF file and it gets converted into a flash book.
If any suggestions please tell me. Thanks
|
|
|
|
|
To do this, you need an API to read PDF and an API to create Flash movies.
Do you want proper semantic conversion (i.e. text is still text, selectable/scalable/etc in Flash)?
For creating Flash documents, can you install things on your server? The (free) Flex libraries include compilers that you can use to create a .swf, but I think it is a Process.Start command line interface, not an integrated .Net API.
Are there any restrictions on the PDF? (e.g. non encrypted or only text or no compression etc).
The drawing primitives of Flash and PDF are quite similar, so a translation should not be too hard, if you can get down to the PDF drawing stream for each page. In an unencrypted PDF that is fairly easy.
|
|
|
|
|
Hi experts,
this actually is not a C# specific question but related to Visual Studio. I posted it here because the mentioned application is written in C# and there seems to be no IDE related forum.
If there is, and I just didn't see it, please move this appropriately.
My solution contains an actual project, a setup project and a setup customization project.
Most of the time I have changed something, I simply hit F6 to compile or F5 to debug. Since the setup project takes a lot longer to compile than the rest, it is left out of this "normal" compilation (Its checkbox in configurations editor is not checked).
Whenever I have solved a bunch of problems and want to compile the whole thing, I have to manually open configurations manager, check the "Build" checkbox for setup, close configurations manager, change to release, build, change back to debug, build, open configurations manager again, uncheck "Build" for setup and close configurations manager.
I tried to record this as a macro. Here is the record
Sub TemporaryMacro()
DTE.ExecuteCommand ("Build.ConfigurationManager")
DTE.ExecuteCommand ("Build.SolutionConfigurations", "Release")
DTE.ExecuteCommand ("Build.RebuildSolution")
DTE.ExecuteCommand ("Build.SolutionConfigurations", "Debug")
DTE.ExecuteCommand ("Build.RebuildSolution")
DTE.ExecuteCommand ("Build.ConfigurationManager")
End Sub
Instead of doing what I described above, it opens the configurations manager, waits for user to close it, builds, changes to release and gives an error message that calling a COM component resulted in HRESULT E_FAIL.
Obviously, this approach doesn't work as expected. How would I have to change the macro to fit my needs?
(Actually, I don't want to open configurations manager. I just want to in/exclude the setup project in/from the build process. And this is the only way I know to do it.)
Edit: Since I chose an inappropriate forum, please don't exceed this thread. Answer here[^] instead.
Ciao,
luker
modified on Tuesday, August 23, 2011 10:05 AM
|
|
|
|
|
lukeer wrote: there seems to be no IDE related forum.
It's the one down on the left titled "Visual Studio".
You do not need to do it this way, you can build any individual project separate from the others for test purposes, and only build your complete solution when you want to. Check the settings on the toolbar and Build menu item.
|
|
|
|
|
Thanks a lot. I totally missed the side menu (am looking at the dropdown usually).
I will try in the correct forum.
Ciao,
luker
|
|
|
|
|
waiting for the reply
plz send to my mail id
lokesh.ibm.prof@gmail.com
|
|
|
|
|
I suggest a good book. I also suggest you remove your email address before you are spammed from hell.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
If you need to start at that basic a level, then I strongly suggest that you find a book, or course that handles the whole of C# in a structured manner, and follow it - doing the exercises as you go. Just trying to find a tutorial on the "bits that you need right now" is a recipe for not understanding enough about what you are doing, and missing important concepts.
I would also back up the comment about your email address: edit your question and remove it - never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
you should download Sams visual c # 24 hour learning Ebook,from Torrentz.com...it will help you...because i am using this book to study c #
|
|
|
|
|
nidobeb wrote: you should download Sams visual c # 24 hour learning Ebook,from Torrentz.com... Or you could buy it or borrow it from your local library.
/ravi
|
|
|
|
|
you should download buy Sams visual c # 24 hour learning Ebook,from Torrentz.com a reputable source ...it will help you...because i am using this book to study c #.
|
|
|
|
|
Voted to remove for poster's own good ... putting an email in a post is dumb. And yes, buy a book. This is not a site of free teaching staff.
|
|
|
|
|
|
Seconded. It should be compulsory reading for all .NET developers.
Regards,
Rob Philpott.
|
|
|
|
|
|
Book, school, or google. Take your pick.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;
namespace new_form_app
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{ }
}
protected void previewButt_Click(object sender, EventArgs e)
{
}
protected void submitButt_Click(object sender, EventArgs e)
{
string M1 = TextBox1.Text;//nak ambil data dari textbox
string M2 = TextBox2.Text;
string M3 = TextBox3.Text;
string M4 = TextBox4.Text;
string strsql = String.Format("insert into NewForm values('{0}','{1}','{2}','{3}')", M1, M2, M3, M4);//ambil value dalam variable M1,M2,M3,M$ dan diberi kepada {0},{1},{2}
//,{4}
OleDbCommand dbComm;//register kepada oledbcommand
OleDbConnection dbConn = new OleDbConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);//intiallize
dbComm = new OleDbCommand(strsql, dbConn);//initialize utk dbcomm
dbConn.Open();//open conn
dbComm.ExecuteScalar();//execute sql command
dbConn.Close();//close conn
Response.Write("Successfull");
}
protected void clearButt_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
}
}
}
|
|
|
|
|
|
how want to preview my web application
|
|
|
|
|