Executing a var within an aspx .inc file?
All,
How do you write out a variable in a ASPX .inc?? I've used the following in
my code and it worked until I changed the date & MyWebSite, to a server side
write... is there any way of getting this to work within an inc file
structure? Thanks in advance. - CES
<%
Response.WriteFile("Yourfile.FileExtension");
%>
----- Yourfile.FileExtension ------
<div id="copyright">
Copyright <%=DateTime.Now.Year.ToString()%> - <%=MyWebSite%> - All rights
reserved.
<br />Use of this site signifies the users complete agreement to all terms,
contained
<br />& described within the Terms of Use page (Updated July 31, 2008)
</div> Tag: Web Browser Control Problem ? Tag: 568903
Click-once app does not run
I built a small app with VS C# Express 2008, and published it as a
click-once app. I tried installing it on my local machine, and when I
click on its icon from the Start menu, nothing happens. Everything
works fine when I run the code from VisualStudio. I get this problem
if I use Debug or Release build config.
I'm sure it must be something rather simple, but I just can't seem to
find it. Tag: Web Browser Control Problem ? Tag: 568898
Installer choices.
Last year I purchased Macrovision (now Acresso's) InstallShield 2008
product to create an MSI package. Without getting into details, I'll
just say I've been very unsatisfied with the InstallShield 2008
product (stability, extensibility, cost of documentation, quality of
support all factors).
I'm not sure how robust my install process is relative to others,
during the install a Windows service must be installed and a few files
are written to windows system folders. During uninstall these steps
must be reversed.
I'd like to hear from those with experience with various installer
packages. I'm looking for an option that's well documented (e.g. if I
want the installer to execute .NET code during install, examples
should be available on-line) also I'd like to know book
recommendations for compiling an MSI package without the use of a tool
(WYSE, InstallShield, etc..).
Jeremy Tag: Web Browser Control Problem ? Tag: 568895
Starting up - help needed
Hello guys! I have a question for you. Let me quicly explain the situation.
I used to be an MS-DOS programmer 15 years ago, using C as a language. I've
been away from daily programming since then and I've not done much with
Windows and .NET development. I've done Access programming and some other
vbscript based development.
I'm back to coding and I will be working with Visual Studio 2008 Pro using
C#. I am willing to work with latest technologies like LINQ and WPF. I will
also be working with ASP.NET for a website.
My question is: apart from Visual Studio 2008 what are the absolute tools
you will recommend me to use? Those top 10 tools I will not be able to work
without?
Thanks for your help!
--
fsantos Tag: Web Browser Control Problem ? Tag: 568889
Writing a Custom BindingList for Mapping between DataObjects and
Hello:
I have a mapping class that can take generic data objects and locate/
add/remove/update DataRows in a DataTable. I associate them using
attributes: TableAttribute and ColumnAttribute. I use reflection to
move the data between the data object and the DataTable.
I would like to make this extremely easy for my Forms developers.
I would like calling AddNew() to call mapper.AddDataRow(dataObject).
I would like changes to call mapper.UpdateDataRow(dataObject).
I would like removing to call mapper.DeleteDataRow(dataObject).
I am trying to implement this. Right now, I am inheriting from
BindingList<DataObject>. However, I am not sure which methods to
override and where to place my code. A quick example would be awesome.
I get the impression this should be easy to do; I just don't know how
to do it correctly.
Also, I would like to know what is the best method for preventing the
addition a bogus values to the BindingList<T>. How can I prevent them
from adding NULL or and instance of U?
Thanks!
~Travis Tag: Web Browser Control Problem ? Tag: 568878
treeview performance
I just learned of an IBM patent(7412649 ) awarded this month for a
method of populating a treeview that improves performance by loading
only the upper level nodes and loading childnodes only when an
upperlevel node is expanded. Has not this method been around for at
least ten years? I remember reading articles on it back in the VB6
days, but cannot locate them now. Anyway, just curious. The patent was
filed in 2005 and there must be numerous examples of so-called "prior
art" on this before that date. If anyone has a refernce to prior
literatue or actual software, let me know.
Bill Tag: Web Browser Control Problem ? Tag: 568874
Error in WPF application
We are using the windows forms webbrowser control in a WPF client
application.
Very rarely we get the following error message:
Message Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.
Stack Trace:
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at
System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame
frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame
frame) at System.Windows.Threading.Dispatcher.Run() at
System.Windows.Application.RunInternal(Window window) at
System.Windows.Application.Run(Window window) at
System.Windows.Application.Run()
Did anyone encounter this kind of problem with a WPF application using
the WebBrowser control?
If so, how did you solve that problem?
(Using the WPF WebBrowser control is not an option since we need
specific functionality from the winform version)
Thanks,
Hans.
-- Tag: Web Browser Control Problem ? Tag: 568873
Close() timeout in NetworkStream and Socket?
I have an application that wants to open a Socket, write data and close the
socket. A persistent connection would be nice, but it's intended to
operate in an environment where the network connection probably isn't
reliable.
So I do this:
// open socket
m_networkSocket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
IPEndPoint them = new IPEndPoint(IPAddress.Parse(hostname), port);
m_networkSocket.Connect(them);
m_networkConnection = new NetworkStream(m_networkSocket, false);
// write
m_networkConnection.Write(arrayOfBytes, 0, arrayOfBytes.Length);
m_networkConnection.Flush();
// close
m_networkConnection.Flush();
m_networkConnection.Close();
m_networkSocket.Close();
All fine & good, but nothing shows up on the other side. If I put a delay
between Flush() and Close() it suddenly starts to work.
So is Flush() is a no-op?
Close() (for both Socket and NetworkStream) has an optional "timeout" value
(an Int32), which is 'the amount of time to wait for data to be sent'. I
_assume_ that's milliseconds, but does anyone know for sure?
That begs the question, however, of just how long do I wait? How do I know
my data has been sent and it's safe for me to close the connection?
Thanks!
al
--
Al Dunstan, Software Engineer
OptiMetrics, Inc.
3115 Professional Drive
Ann Arbor, MI 48104-5131 Tag: Web Browser Control Problem ? Tag: 568867
Constructor Accessibility - protected ctor inside public class with
Hello:
I have a public abstract class. The concrete subclasses must pass an
instance of an internal class to the abstract class' ctor.
I like to make the constructors of my abstract classes protected.
However, since it has a parameter that is of an internal type, I am
forced to make it internal also. This is fine since no one outside my
library can see it.
However, I would prefer to restrict this even more, so that only
subclasses can see the ctor.
"protected internal" provides the relationship:
visible to code within the library OR ANY subclasses.
I want:
visible to code within the library AND internal subclasses.
I suppose there is no solution. I was hoping someone could give me
some insight, however.
Thanks,
Travis
P.S. - I can't make the abstract class internal since it implements a
public interface and the subclasses are public. Tag: Web Browser Control Problem ? Tag: 568862
OT: Forum for WPF
Hi!
Is there a special forum for WPF?
I Cant find any on the public news group of microsoft.
What i am looking for in general is, Us MDI or NOT, if NOT, how, examples of
different approaches etc.
Regards
Martin Tag: Web Browser Control Problem ? Tag: 568860
managing c++ pointer reference from c#
I'm writing a C++ managed .dll that I will call from my C# app. The C+
+ code will need to return an object pointer to the C# that will need
to be passed back for subsequent method calls. The C# code doesn't
need to do anything with the pointer, just accept it as a return value
from the first method and then pass it to the rest.
Can anyone get me started here? I can't figure out how to type the
parameter in the C# dllimport statment and/or the c++ code.
thanks!
Deanna Tag: Web Browser Control Problem ? Tag: 568859
Deserialization issue
I'm getting an error when deserializing my objects:
"The ObjectManager found an invalid number of fixups. This usually indicates
a problem in the Formatter."
I added a new object to a class that gets serialized and put the
OptionalField attribute on that object. When trying to deserialize my object
in an older version of our application that doesn't have this new class I
get the above error but that's only when items have been added to the class.
The class looks like this:
public class MyCollection : BindingList<MyClass>
{
}
public class MyClass
{
private string mystring;
private CustomEnum myenum1;
private CustomEnum2 myenum2;
}
public class ClassThatGetsSerialized
{
string member1;
int member2;
...
...
[OptionalField]
MyCollection mycollection;
....
}
The error only occurs if object ClassThatGetsSerialized is deserialized by
an older version that doesn't have the definition for MyCollection and if
the member of ClassThatGetsSerialized.mycollection has items in it. If there
are no items then the error does not happen.
We use the OptionalField attribute in many places and it always works fine.
Any ideas?
Thanks,
Joe Tag: Web Browser Control Problem ? Tag: 568857
Need for efficient method for File Parsing and copying
I am trying to update another developers code, and am stuck in a
cludge.
It works like this:
A user uploads a file from the web page. Our code reads from a
NetworkStream to a Filestream, and writes out a temporary file. Then
the file is parsed (The file contains HTML data + the actual binary
file that was transmitted). As part of the parsing, once the main
binary file is to be parsed out, it is written with a new Filestream,
byte by byte to a new location on disk.
This was great when the file was 24Mb, but now it is 70Mb, and our
windows CE device can not hold 2 copies of this large file. Not to
mention that the additional copy takes a while to perform.
To me it seams that there are two methods to solve this, the first
being to read the networkstream realtime until the actual binary file
shows up, then filestream directly. The second method, which to me
seems simpler, is to just take the large temp file, and truncate off
the non-binary data.
By the way, I can not use a memorystream, as I have alocated most of
the device memory to storage, thus there is not enough memory room.
Anyone have any advice??
Tom Kuhn Tag: Web Browser Control Problem ? Tag: 568850
to deal with C++ OLE in C# code.
Hi Everyone ,
I badly stuck up in C# application which use C++ OLE to communicate with a
device to get data from device.
I converted C++ code into C# to build this application but still using C++
OLE. I couldnot get any data from device through OLE.
Can some help me?
Following is an example.
C++ code:
/*******************************************************************************
OLESendCommand
the function used to send and receive data from the device
The public member variable 'UsingTunnel' is passed to the OLE function.
subsys : the subsystem
cmd : the command
reg8 : an option byte that is the fourth transmitted byte
dataout : 32 bit, little endian data.
this forms the payload bytes 4,5,6,7 (out of 0,1,2,3,4,5,6,7)
*resultinformation : this is the result returned from the transaction
often will be RET_ACK or RET_DATA32 or RET_NAK.
*recvbuffer : must be supplied with a uchar buffer 8 bytes long.
generally, only the first four bytes are filled, corresponding to the
bytes
4,5,6,7 out of (0,1,2,3,4,5,6,7)
up to 8 bytes can be returned for long format commands
A non zero value is returned if there was no reply from the device.
*******************************************************************************/
uint32 CCOMLib2::OLESendCommand(
uint32 subsys,
uint32 cmd,
uint32 reg8,
uint32 dataout,
uint32 * resultinformation,
uint8 * recvbuffer //buffer 8 deep
) {
uint32 result;
try {
result=V.OleFunction("SendCommandTemp",UsingTunnel,
DeviceAddress,
subsys,
cmd,
reg8,
dataout,
resultinformation,
(uint32*) &recvbuffer[0],
(uint32*) &recvbuffer[4]);
}
catch (Exception &E) {
LM("Unable to access ole function with "+
AnsiString(E.Message),3);
return 2;
}
if (result) LM("failed.");
return result;
}
converted C# code:
public unsafe Int32 OLESendCommand(Int32 subsys, Int32 cmd, Int32 reg8,
Int32 dataout,
Int32* resultinformation,ref byte[]
recvbuffer) //buffer 8 deep
{
Int32 result;
byte[] buffer_1 = new byte[8];
byte[] buffer_2 = new byte[8];
try
{
// result = V.OleFunction("SendCommandTemp", UsingTunnel,
// DeviceAddress, subsys, cmd, reg8, dataout,
resultinformation,
// ref recvbuffer[0], ref recvbuffer[4]);
result =
(Int32)V.GetType().InvokeMember("SendCommandTemp",
System.Reflection.BindingFlags.InvokeMethod, null, V,
new object[] { UsingTunnel, DeviceAddress,
subsys, cmd, reg8, dataout,(Int32)resultinformation,
recvbuffer[0], recvbuffer[4] });
// buffer_1, buffer_2 });
}
catch (Exception e)
{
LM("Unable to access ole function with "+e.Message,3);
return 2;
}
if (result != 0) LM("failed.");
return result;
}
Help me as early as possible.
Regards,
--
atul baxi Tag: Web Browser Control Problem ? Tag: 568845
Linq Query. Please, help. Going crazy ...
Hi,
On a form I have an input where tags are inserted in a CSV format.
Then on my code I convert the CSV string to a List<Tag>. Tag is an
object with two properties: TagID and Name
So when I do the conversion I only fill the Tags names ...
Then I use a join to find these tags into my database.Tags and get
their ID's.
This is what I have:
// Parse form post tags
List<Tag> form = paper.Tags.Split(new char[] {','},
StringSplitOptions.RemoveEmptyEntries).Select(t => new Tag { Name =
t.Trim() }).ToList();
// Define updated post tags
List<Tag> updated = new List<Tag>(from t in database.Tags
join f in form on t.Name
equals f.Name
select t).ToList();
I debugged and the "form" list has the names of the tags I inserted.
And those names do exist in database.Tags.
However, I always get the following error on my second query:
Local sequence cannot be used in LINQ to SQL implementation of query
operators except the Contains() operator.
I have no idea why do I get this. My code seems ok ... I tried
everything I could think of to solve this.
Does anyone knows why do I get this?
Thanks,
Miguel Tag: Web Browser Control Problem ? Tag: 568840
write what line is work now
Can i write what line is work now?
try
{
...
}
catch
{
console.writeline("at program.cs line {0}", XXX)
}
console.writeline("at program.cs line {0}", XXX)
how to write this line's number? Tag: Web Browser Control Problem ? Tag: 568833
System.Chart[] when convert to string
Hi,
I am using a DLL file to get a function. This has one parameter which
is a pointer. To access the function I do the following:
---------------------------------------------------------------------------------------------------
[DllImport("statax.dll")]
public static extern unsafe int fnReadMeas(char* buf);
---------------------------------------------------------------------------------------------------
Later on, in a button event I call this function as follows:
---------------------------------------------------------------------------------------------------
int Valor=0;
char[] m_BufMeas=new char[256];
fixed(char* DataRead=m_BufMeas)
{
Valor=fnReadMeas(DataRead);
if(Valor==1)
{
Mylabel.Text=Convert.ToString(m_BufMeas);
break;
}
}
---------------------------------------------------------------------------------------------------
On MyLabel I get the following text "System.Chart[]".
Any tip of how to solve this problem? I should be getting several
numbers in m_BufMeas.
Thanks in advance for your help.
Axel. Tag: Web Browser Control Problem ? Tag: 568826
Question on interfaces and inheritance
Should a class implementing an interface define the methods in the
interface?
That seems logical to me but I have the following code:
public class XmlDataSourceMarc : XmlDataSource
{
protected DataSourceView tst;
public override DataSourceView GetView(string viewName)
{
return tst;
}
}
This gives the error: 'XmlDataSourceMarc.GetView(string)': no suitable
method found to override
Now if I look at the base class, it's true GetView is not defined in the
class
public class XmlDataSource : HierarchicalDataSourceControl, IDataSource,
IListSource
{
public XmlDataSource();
public virtual int CacheDuration { get; set; }
public virtual DataSourceCacheExpiry CacheExpirationPolicy { get;
set; }
public virtual string CacheKeyDependency { get; set; }
public virtual string Data { get; set; }
public virtual string DataFile { get; set; }
public virtual bool EnableCaching { get; set; }
public virtual string Transform { get; set; }
public virtual XsltArgumentList TransformArgumentList { get; set; }
public virtual string TransformFile { get; set; }
public virtual string XPath { get; set; }
public event EventHandler Transforming;
protected override HierarchicalDataSourceView
GetHierarchicalView(string viewPath);
public XmlDocument GetXmlDocument();
protected virtual void OnTransforming(EventArgs e);
public void Save();
}
But the IDataSource interface it should implement has.
public interface IDataSource
{
event EventHandler DataSourceChanged;
DataSourceView GetView(string viewName);
ICollection GetViewNames();
}
So what am I missing? Why XmlDataSource does not have an implementation of
DataSourceView GetView(string viewName) while it implements the interface
IDataSource that defines it?
Marc Wentink Tag: Web Browser Control Problem ? Tag: 568824
XML driven Menu control generation
Anyone have idea how to build a configurable menu control. The menu items must be read from XML or from the database & the items must be built. Options must be provided for generating horizontal or vertical menu. Any idea would be helpful. Tag: Web Browser Control Problem ? Tag: 568821
XML driven Menu control generation
Anyone have idea how to build a configurable menu control. The menu items must be read from XML or from the database & the items must be built. Options must be provided for generating horizontal or vertical menu. Any idea would be helpful. Tag: Web Browser Control Problem ? Tag: 568820
No image in firefox
I have the following code to show an image in html:
"   :.. <img src=\"\\Resources\\Icons\\TarefaAEspera.gif\"
/> Task"
In IE image are showed correctly, but in Firefox donâ??t.
What I am doing wrong to firefox donâ??t show image?
Thanks & Regards,
Rui Oliveira Tag: Web Browser Control Problem ? Tag: 568810
Looping through dataset to array
Hello
Is there an example of looping through a dataset filling an array with it?
Thank you Tag: Web Browser Control Problem ? Tag: 568805
After import the wsdl i have lost it a bit
Hi,
I have trouble to execute the UitDeCOVClass.controleer
in my "hello world" project. The problem is that i dont understand how
the wsdl class must be reached and the right value must be filed.
Groetjes Rene
Here is the code .....
************************************
....
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
....
void Button1Click(object sender, EventArgs e)
{
/*
The wsdl file is at :
https://acccertificaten.vecozo.nl/webservices/cov/vz3738.asmx
*/
X509Store store = new X509Store(StoreLocation.CurrentUser);
store.Open(OpenFlags.ReadOnly);
X509CertificateCollection col =
store.Certificates.Find(X509FindType.FindByIssuerName, "VEcCOZO",false);
vecozo.vz3738 UitDeCOVClass;
UitDeCOVClass = new vecozo.vz3738();
// check certificate if found
if (col.Count == 1)
{
UitDeCOVClass.ClientCertificates.Add(store.Certificates[0]);
} else MessageBox.Show("No certificate found what match.");
/*
from here i lost it..
I cant get the UitDeCOVClass.controleer(......) to work
*/
vecozo.AanvraagCovType ThePatient;
ThePatient = new vecozo.AanvraagCovType();
vecozo.RetourinfoCovType TheReturn;
TheReturn = new vecozo.RetourinfoCovType();
vecozo.ControleerInput Patients;
Patients = new vecozo.ControleerInput();
ThePatient.Achternaam = "Do"; //John Do
ThePatient.Geslacht = 1;
ThePatient.GeboorteDatum=DateTime.Parse("26-08-2008");
ThePatient.PeildatumVerzekering = DateTime.Parse("26-08-2008");
UitDeCOVClass.controleer(Patients);
// finaly check if we have got something from vecozo
MessageBox.Show(Convert.ToString(TheReturn.BSN));
} Tag: Web Browser Control Problem ? Tag: 568802
System.web.mail
I am using system.web.mail(.net framework 1.1) to send emails
Now i want to receive
the bounced mails in a different email id from that of the from(sender) id
How to do this? Can any one throw light on this? Tag: Web Browser Control Problem ? Tag: 568797
facing an issue querying AD using C#
Hello,
I am facing an issue while querying Active directory using C# code with
system.DirectoryServices namespace.
Here is the path for my LDAP -
"LDAP://CN=XY - C++/Unix and other, OU=Automatic,OU=DLs,DC=domain,DC=com";
I have replaced the / character with\/- but still is giving error while
querying. Please help me to resolve this.
Also is there any way to query on the distribution lists from a given active
directory path?
Thank you.
Suhas Vengilat Tag: Web Browser Control Problem ? Tag: 568796
Re: MarshallAs for char* buffer
> Try this....
>
> [DllImport("mydll.dll", CharSet = CharSet.Ansi)]
> public static extern int getData(StringBuilder result, ref long bufflen);
>
> StringBuilder result = new StringBuilder(500);
> int resultLen = 500;
> getData(result, ref resultLen);
>
Thanks a lot. That worked. Tag: Web Browser Control Problem ? Tag: 568792
avicap32 - Please Help
Hi,
I'm using avicap32 to capture video from my webcam, but I've a
problem. I can cerate preview in ex. in picturebox component, but I
need to get image from camera to Bitmap or Image component, because I
want to use this to motion detection. I don't know how I can get
picture from camera to Image variable.
Please help
Maciek Tag: Web Browser Control Problem ? Tag: 568780
MarshallAs for char* buffer
I'm trying to use some closed source unmanaged C++ dll.
One of functions I have to call have signature as follows:
int getData(char * buffer, long * bufflen);
And this function requires that buffer is initialized to hold bufflen
chars.
bufflen after function is called will contain lenght of response
data.
If I try to marshall it using
[DllImport("mydll.dll",CharSet = CharSet.Ansi)]
public static extern int getData(
[MarshalAs(UnmanagedType.LPStr)] out StringBuilder result,
out long bufflen);
i get acces violation exception, despite that string builder is
initialized by:
long bufflen 256;
StringBuilder result = new StringBuilder((int)bufflen);
DllMapper.getData(out result, out bufflen);
What I'm doing wrong? Tag: Web Browser Control Problem ? Tag: 568779
DataSource in form of Object
Hello!
In the Data Source Configuration Wizard I can choose Object as a Data
source.
It feel much more natural to have Database as the Data source.
I feel very uncertain about having Object as the DataSource.
Can somebody give me an good example when to use Object as the data source
or
a good page where I can read about that.
//Tony Tag: Web Browser Control Problem ? Tag: 568778
text "variables"
Hi
sorry, this doesn't really have anything to do with c#, but I wasn't
sure where else to post.
I am writing some code which needs to parse some text (a string) which
is to contain "variables" (special tags) which should be replaced with
real values.
For example, a variable called "CURRENT_DATE" or "USER_NAME".
Is there any standard or best-practice for the syntax for this sort of
thing?
Like "As of today {%CURRENT_DATE%} your username {%USER_NAME%} is
suspended..."
Thanks,
Peter
-- Tag: Web Browser Control Problem ? Tag: 568771
Regular expression
Hi
I'm struggling with a regex that will check for 0-1 in a string of 1-8
characters,
as in a binary string.
Most examples I've seen checks a pattern in a complete string but I would
like to
check every input by TextBox_TextChanged event that means the string could
vary from
1 to 8 characters.
So far I'm managed to check the first char, but then it also accepts 2-9.
Any help appreciated. Tag: Web Browser Control Problem ? Tag: 568770
Database objects
Hello!
Can somebody give a simple example for these two terms.
1.What is the database object Types in SQL Server 2005 ?
2. What is the database object assemblies in SQL Server 2005 ?
//Tony Tag: Web Browser Control Problem ? Tag: 568769
SQl Server 2005
Hello!
If I for some reason want to disable the feature to use Windows
Authorization to be able to log in to SQL Server 2005 how is this done.
I must admitt that I have no reason at all for doing this but I just want to
have the knowledge to do this.
//Tony Tag: Web Browser Control Problem ? Tag: 568762
Why does x.ToString() throw an error if x == null?
If we have something like this
object x = null;
MessageBox.Show(x.ToString())
we get an error. That kindof makes sense but there is no reason the
behaviour couldn't be to return an empty string. When we call x.ToString we
are really calling a function like this:
class Object
{
public static string ToString(object* Instance)
{
//code to convert the object pointer to a string
}
}
Why can't the compiler just pass in Instance as a null and let the code sort
it out. If the code wants to throw an error then it can but if it wants to
do something more useful then it can. This would be useful in some cases (I
admit they are rare but the ToString example above could potentially be used
quite often). I can think of a few cases where this could be useful, eg:
string x = null;
MessageBox.Show(x.IsNullOrEmpty.ToString())
MessageBox.Show(x.Length.ToString()) //<--- shows zero
DateTime? y;
MessageBox.Show(y.IsValid)
The interesting thing is you can define extention methods that do work on
null objects, eg
static class Extensions
{
public static bool IsSomething(this string s)
{
return !string.IsNullOrEmpty(s);
}
public static string ToStringIgnoreNull(this object s)
{
if(s == null) return string.Empty;
return s.ToString();
}
}
Then use it like this:
string x = null;
if (x.IsSomething()) MessageBox.Show(x)
or
object x = null;
MessageBox.Show(x.ToStringIgnoreNull())
Any comments?
Cheers,
Michael Tag: Web Browser Control Problem ? Tag: 568760
how to convert my existing application as plug-in for
already we are having a web application .but now we have to make it as a plug in applicaion
for outlook is it possible. if it is possible please provide me some samples Tag: Web Browser Control Problem ? Tag: 568758
how to convert my existing application as plug-in for
already we are having a web application .but now we have to make it as a plug in applicaion
for outlook is it possible. if it is possible please provide me some samples Tag: Web Browser Control Problem ? Tag: 568756
StoredProcedure
Hello!
I just wonder when you use StoredProcedure will you then use DataSet ?
In the example that I have seen is the DataSet not used is this normal ?
//Tony Tag: Web Browser Control Problem ? Tag: 568750
inheritance in C#
I have a web page (compiled with .net 2.0 /Visual studio 2005)
http://people-places-work.info/addPerson.aspx
derived from System.Web.UI.Page, but I would like to insert an intermediate
class called addPersonBase from this local project.
This worked for me in VB, but C# wants something more.
---------addPerson.aspx.cs
public partial class addPerson :
//System.Web.UI.Page
addPersonBase
{ ....
}
----------end
---------addPersonBase.cs
public class addPersonBase :
System.Web.UI.Page
{
public addPersonBase ()
{
....
}
----------end
Unfortunately when I do that I get an error
Error 1 The type or namespace name 'addPersonBase' could not be found (are
you missing a using directive or an assembly reference?)
Any ideas on how to fix that? Tag: Web Browser Control Problem ? Tag: 568746
Application fails
I copy my release version executables and dlls to a production PC. It fails
to run causing an error message with the following text: "Application" has
encountered a problem and needs to close...
My question-
Is there a way to find out by this massage what is the error source
or to produce a more friendly message?
Regards
I. Lesher Tag: Web Browser Control Problem ? Tag: 568744
find row/column of a System.Windows.Forms.ListView MouseDoubleClick event
Hi,
What is the best way to find the row/column of a System.Windows.Forms.ListView
MouseDoubleClick event? Searching the rows and columns for SelectedItems[0] will not
work for me, too many duplicated values.
Thanks
Viepia Tag: Web Browser Control Problem ? Tag: 568725
Regarding Programming with SQL Express and SQL Developer's Edition
When I bought my copy of Visual Studio it came with disks to install the
"developer's edition" of MS SQL. However, while installing Visual
Studio, the Express version was automatically installed and I have been
using the express version with my C# programs.
My question is, what, if any, benefit would there be in installing the
developer's version instead of continuing to use the express version.
Thanks in advance for your responses. :)
Todd Tag: Web Browser Control Problem ? Tag: 568720
Detecting presence of scrollbars in a ListView
I inherited an owner drawn control that subclasses the Windows Forms
ListView control to provide additional functionalities. I wanted to
detect the presence of the Vertical scrollbar so that I can disable a
few buttons. This code didn't work:
foreach (Control c in ownerDrawnListViewObject.Controls)
{
if (c is VScrollBar)
{
return c.Visible;
}
}
This didn't work because, to my surprise,
ownerDrawnListViewObject.Controls.Count returned 0!
Am I going about this the wrong way? Tag: Web Browser Control Problem ? Tag: 568704
form.focus() event
Can some one tell me which event will be fired when we say
form.focus() in C# .NET 2008?
I tried Activated, Load and Enter. But it did not fire.
Please let me know.
THanks Tag: Web Browser Control Problem ? Tag: 568701
calling the super class
How would you explicitly call a method of a 'super' class in C#? What do I
put at the dots to just call the GetHierarchicalView of XmlDataSource?
public class XmlDataSourceMarc : XmlDataSource
{
protected override HierarchicalDataSourceView GetHierarchicalView(string
viewPath)
{
return .....;
}
} Tag: Web Browser Control Problem ? Tag: 568684
Windows Forms - Opening forms within forms
In my application I have a form (Customer) that I want to be able to open
multiple copies at once. Within this form I have other forms that can be
opened. Example: ZipCode. When the user enters a zipcode that is unknown
this form will open. I don't want users to modify any of this customers
data until they close the zipcode form. Normally this can accomplished
using a modal form, however this prevents me from opening a new copy of the
Customer form while the zipcode form is open.
How do you normally go about handling this scenario ?
--
Thanks,
Dan Tallent Tag: Web Browser Control Problem ? Tag: 568677
avoid case statement
c# vs2008
HI:
I have to replace a string with somevalue, I use the case
any Ideas how to better implement this (avoid regex if possible).
(was thinking of a dictionary?)
thanks
case "a"
myvar = "1a"
break
case "w"
myvar = "bb"
break
case "L"
myvar = "po"
break Tag: Web Browser Control Problem ? Tag: 568672
Detecting the default Windows screen res.
I have customers who install our product and then set the screen resolution
to a crappy resolution so things don't display on the screen correctly. I'd
like to know what the default monitor setting is set to. I'd also like to
know what windows has detected as the default screen res.
I'd also like to find out information about what monitor is hooked up to the
computer. I realize this isn't always right but I'd like to know what
windows is reporting.
TIA - Jeff. Tag: Web Browser Control Problem ? Tag: 568671
C# language wish list
There are 2 features that I keep wishing C# had. These are not
groundbreaking ideas, and I haven't given these too much thought, but
I wonder if others have also wanted these types of language features.
1. C# Keywords for reflection. The idea here is that we can access
PropertyInfo through a keyword. An example might be: PropertyInfo
pinfo = propertyInfo(MyClass.TestProperty);
Where "propertyInfo" is the new keyword. My motivation for this is
that now I can change the name of "TestProperty" to something else and
VS refactoring will be able to find this reference to the property.
This could extend to other reflection types like MethodInfo as well.
2. Namespaces inside classes. Some classes can get quite large and it
would be useful to break down methods and properties into categories.
Look at all the methods, properties, and events inside any WinForms
control for instance and there are just too many. Here's an example
of a class using my proposed namespace idea:
class Panel
{
namespace Appearance
{
public Color BackgroundColor { get; set; }
}
}
Then you'd use an instance of Panel like this:
panel.Appearance.BackgroundColor = Color.Blue;
I guess class namespaces could be labeled as sealed, public, private,
protected as well, although I haven't thought about this too much. In
addition to just being able to categorize methods, properties and
events, there are some repercussions which come from this. For
example, you could now have 2 methods in a class with the same
arguments but different return types, as long as they are in different
namespaces. Tag: Web Browser Control Problem ? Tag: 568661
how can i use WebBrowser control without load the add-ons? i do not mean
hide it from menu items
'cause if i can do that ie will start faster than normally
I don't know, but there is also the Gecko engine used by Firefox and a
control to embed it in DotNet.
This might remedy your issues.
"in da club" <s> wrote in message
news:eqC7ffNCJHA.4724@TK2MSFTNGP05.phx.gbl...
> how can i use WebBrowser control without load the add-ons? i do not mean
> hide it from menu items
> 'cause if i can do that ie will start faster than normally
>