|
I will tell clearly my doubt here.When selecting the check box,i've to visible 2 text boxes.For that i need the code.Can any of you give me the code.
Babu
|
|
|
|
|
Hello
Handle the CheckedChanged event, then this:
private void MyCheckBox_CheckedChanged(object sender, EventsArgs e)
{
if(MyCheckBox.Checked)
{
MyTextBoxA.Visible = true;
MyTextBoxB.Visible = true;
}
else
{
MyTextBoxA.Visible = false;
MyTextBoxB.Visible = false;
}
}
That's it! So, where is the question now??:->
Regards
-- modified at 7:30 Wednesday 23rd August, 2006
|
|
|
|
|
or even simpler
<br />
private void MyCheckBox_CheckedChanged(object sender, EventsArgs e)<br />
{<br />
MyTextBoxB.Visible = MyTextBoxA.Visible = MyCheckBox.Checked;<br />
}<br />
|
|
|
|
|
Hey!!
I like fancy long codes!
Regards
|
|
|
|
|
I guess telling you to set the Visible property on a textbox wasn't clear enough for you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello,
I call an external program over the instruction Process.Start (...).
Is there a possibility to modify the header line of the called program . I know the MainWindowHandle etc. but unfortunately i can only pick out and not change the title.
Does somebody have a proposal for my problem?
gitschi
|
|
|
|
|
You can use Win32's SendMessage(hWnd, WM_SETTEXT, 0, Text) through interop.
|
|
|
|
|
Hye,
thanks for your tipp.
I have solved my problem with the following code.
##################################################################
public class Win32
{
[DllImport("user32.dll")]
public static extern int SetWindowText(IntPtr hwnd , string str);
}
Win32.SetWindowText (hwnd,"new Windowtitle....");
##################################################################
|
|
|
|
|
Hi all,
I have added linkbutton to the datagrid in the template column.i have to display particular field of datasource to the lnkbutton text.My code is like this
this is a class file
public class DataGridTempla :System.Web.UI.Page,ITemplate
{
ListItemType templateType;
string columnName;
public DataGridTempla( ListItemType type,string colname)
{
templateType = type;
columnName = colname;
}
public void InstantiateIn(System.Web.UI.Control container)
{
Literal lc = new Literal();
LinkButton lb = new LinkButton();
lb.Click+=new EventHandler(lb_Click);
case ListItemType.Item:
lc.Text=columnName;
lc.Text = "Select " + columnName;
lb.CommandName = "EditButton";
lb.Text= "" + columnName + "";
//container.Controls.Add(chkb);
container.Controls.Add(lb);
container.Controls.Add(lc);
}
this is my webform coding
TemplateColumn tc=new TemplateColumn();
tc.ItemTemplate=new DataGridTempla(ListItemType.Item,"BrandId" );
BoundColumn bc=new BoundColumn();
bc.DataField="Brand_Name";
DataGrid1.Columns.AddAt(0,tc);
DataGrid1.Columns.AddAt(1,bc);
DataGrid1.DataBind();
please try this.
sivamyneni
|
|
|
|
|
Siva Myneni wrote: please try this.
Ok, I tried it, now what?
First, as this is related to ASP.NET you might get a better response by posting it to that forum.
Second, try using a template in the the aspx rather creating it in the code-behind
only two letters away from being an asset
|
|
|
|
|
Hi,
In my solution I have a project for the application and the installer project. The installer builds "Applicationname install.msi", and everything works great.
What I would like to do is this:
Simple solution:
Get the installer project to build "applicationname install <versionnumber> <debug|release>.msi" instead of just "applicationname install.msi" which I then have to rename manully afterwards. Is this possible ?
Optimal solution:
Checking files into subversion creates an assemblyinfo.cs with the number 1.0.0.<subversion_revision> or something. I know how to do this. I could also update the "installerprojectfile.vdproj" to reflect this, although this would change the status of the .vdproj file subversion-wise... ah well.. But that would allow me to automatically update the version in the installer - and if I could get that version reflected in the installer filename I would be home safe
Anyway - has anybody a clue regarding the simple solution ? Is it possible at all in the build-in deployment project ?
/Jan
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
You can change the name by going to the properties of the setup project and changing the Output file name.
You can setup a postbuild event in the insall project to update the filename with version number.
only two letters away from being an asset
|
|
|
|
|
aha... thanks for the answer, Mark.
I have to select the install project and then the properties tab in order to get the list of project properties (right clicking and selecting properties brings up a dialog with nothing relevant). In the list of project properties I can specify a post-build event, which brings up a dialog with these three macros:
$(BuiltOuputPath)
$(Configuration)
$(ProjectDir)
which are, in turn,
c:\...\folder\debug\applicationname.msi
Debug
c:\...\folder\
So I could write something like
rename $(BuiltOuputPath) $(ProjectDir)$(Configuration)\appliactionname <version>.msi
which would expand to
rename c:\...\folder\debug\applicationname.msi c:\...\folder\debug\applicationname <version>.msi
but how do I retrieve the version number here ? If I have to change the post build macro each time I change version I might as well just change the filename manually
/Jan
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
You have to get a little more creative, think outside teh macro box.
Write a script(WSH) or simple console app that can be called from the post build event which will read the file for version infor and update the msi file name.
only two letters away from being an asset
|
|
|
|
|
I see.. No built in support for this kind of advanced scheme ) Strange that you can't get project properties like version in the macro.
However, no matter how much out of the macro box I think, I still cant see how I can retrieve the project version number from the msi file. Got any ideas for that ?
Do you know why it's important to make fast decisions? Because you give yourself more time to correct your mistakes, when you find out that you made the wrong one. Chris Meech on deciding whether to go to his daughters graduation or a Neil Young concert
|
|
|
|
|
I use singleton pattern to connect to a database and sql sentences , but the string connections read one time from an xml file when i do new SingletonClass().
Is this safe?? cos the string connection that i read, is stored on a private attributte of the singleton class.
and the next times that i want to access to database i dont read the xml with the parameters to the string connection,i use the string var with the string connections.
thanks
God make a perfect team, the rest have foreigners, Athletic Club Bilbao
|
|
|
|
|
Legolas.Bilbao wrote: Is this safe??
Are you worried about the connection string being stored in an xml file on the disk ?
|
|
|
|
|
worried about string connection had stored on memory its a problem or not? maybe its a paranoic question
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
in my application I want to try delete an image file.. but at every attempt I get an
[System.IO.IOException] {"The process cannot access the file '..\\addAll.png' because it is being used by another process."}
I am sure that this file is not in use because I just dispose the Image object using this file with :
((PictureBox)flowLayoutPanelThumbs.Controls[0]).Image.Dispose();
flowLayoutPanelThumbs.Controls.RemoveAt(1)İ
1-Why occurs this cannot access bla bla bla error and how can I avoid this?
2-How can I find the process using this file
I will REALLY appreciate any help..
thanks and best regards
.:: Something is Wrong ::.
|
|
|
|
|
Use this tool: Process Explorer [^] to find which process is holding the handle to the mentioned file.
|
|
|
|
|
As suhredayan suggested, first check if some other process is holding open a handle to the file. If it's your process, how are you creating the Image object? I vaguely remember there being a bug in the framework that caused this problem if the Image instance is created using Image.FromFile . If you're using Image.FromFile, you could try Image.FromStream instead.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
If you load an image yourself, then the file handle stays open until you call dispose. If you've called dispose, you should be able to save it. The answer often is if you use FromFile, to make a copy, keep the copy and dispose of the original right away.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for the answers.. As you guessed the FileHandle stays open so I taked a copy and Dispose the orignal one..
rule 1 : always use "using(.....){ }" when you are working with object that needs to be closed by hand
Thanks a lot..
.:: Something is Wrong ::.
|
|
|
|
|
1. Can I make my own skin for C#.net app as i see GUI of professional app?
2. How to make it? What function or class?
3. Could u give me some example ?
AAA
|
|
|
|
|