|
OK. A clue, and the only one I'll give. ListView has two properties that begin with Selected read the documentation for them.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am working in Microsoft Visual Studio 2008 using C#. I populated my webpage from a database which was SQL Server 2005. On the webform that will be displayed to the users, I want to display a textbox when they click the checkbox, and if they don't click the checkbox I don't want the textbox to be displayed. How do I go about this?? Thank you!!
Shane
|
|
|
|
|
We have an ASP.NET forum.
You would do this with javascript, which means it's more of a general web dev question.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
this can be done with javascript
use,
function ChkFunc()
{
var chk = document.getElementById("<%=CheckBox1.ClientID%>");
var txtbox = document.getElementById("<%=TextBox1.ClientID%>");
if (chk.checked) {
txtbox.style.display = "block";
}
else {
txtbox.style.display = "none";
}
return;
}
in code behind,use
CheckBox1.Attributes.Add("onClick", "return ChkFunc();");
to make the textbox invisible on load, cal this javascript function in page load as well
dont use TextBox1.Visible=false in page load,then this script gives error.
Hope it helps u.
|
|
|
|
|
Thank you for your help
Javascript won't work in C# Asp.net though will it??
|
|
|
|
|
I have code that is written in textbox
How do I make it work as code?
for example:
textbox1.text="this.Backcolor=System.Drawing.Color.Red"
how do I make it turn red?
|
|
|
|
|
What you seem to be doing is different, to say the least. As such I have no answer for you.
Whilst your question is clear and understandable, is there any chance that you can broaden your description to include the aim of the application, or why the user would be typing code into a text box?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
because I am writing a new language as a orogect to my college and then I translate it o c# in a text box but I have no idea how to make it work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
In simple words, you cant. Learn how to use regular expression if you really need this type of task.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Of course you can; I have a small program that takes one method from a textbox, compiles and executes it. It is based on CSharpCodeProvider class. It isn't beginner's stuff though.
IIRC there has been a CP article on the subject, several years ago.
|
|
|
|
|
|
There seems to be a problem with my code when I try and retrieve multiple tables. Please tell me what's wrong, or if there is an alternative way to do this? Thanks in advance.
OleDbConnection clsConnection;
clsConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\one.mdb;");
clsConnection.Open();
WTest1.oneDataSet f_table = new WTest1.oneDataSet();
OleDbDataAdapter dAdapter = new OleDbDataAdapter("SELECT * FROM first", clsConnection);
dAdapter.Fill(f_table, "first");
WTest1.oneDataSet s_table = new WTest1.oneDataSet();
OleDbDataAdapter dAdapter1 = new OleDbDataAdapter("SELECT * FROM second", clsConnection);
dAdapter1.Fill(s_table, "second");
<br />
Runtime Error: Syntax Error in FROM Clause
--Star
modified on Wednesday, April 29, 2009 1:04 PM
|
|
|
|
|
And which is exactly the problem ???
|
|
|
|
|
Runtime error: Syntax Error in FROM clause
|
|
|
|
|
Why are you using typed datasets?
Can you use System.Data.DataSet datasets???
|
|
|
|
|
|
|
I have a web application where I need to take an object I created and return the value to a list.
For example, one of the samples I was referencing was from a blog app (dotnetblogengine). This code was to return all blog posts created within a specific date range. The code looked like this:
List<post> list = Posts.FindAll(delegate(Post p)
{
return (p.DateCreated.Date >= dateFrom && p.DateCreated.Date <= dateTo);});
}
</post>
I now need to do something similar however I need to take all sales from our sales reps and return their total amount earned into the list. So for example, here's some sample data:
Employee ID | Employee Name | Sales Transaction Amount
---------------------------------------------------
1 | John | 18.47
2 | Beth | 27.67
1 | John | 12.04
1 | John | 10.50
3 | Allen | 34.87
2 | Beth | 19.12
I would then need to return to the list, the following:
Beth: $46.79
John: $41.01
Allen: $34.87
How could I do this using something like the following:
List<sales> list = Sales.FindAll(delegate(Sales s)
{
}
</sales>
Any ideas or where I could look to find some similar samples?
Thanks.
-Goalie35
|
|
|
|
|
If you are not averse to using LINQ you could do something like
List<product> products = GetProductList();
var categories =
from p in products
group p by p.Category into g
select new { Category = g.Key, TotalUnitsInStock = g.Sum(p => p.UnitsInStock) };
ObjectDumper.Write(categories);
</product>
For context this is pasted directly from the 'Sum - Group' example from MSDN[^].
If you investigate and decide that it is a usable approach, any follow-up questions might be better asked in the 'Linq and .NET 3.5' forum.
Please don't ask me. I've only just started learning LINQ myself.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
need a prog to send messages to administrator or account holder's mobile through bluetooth or any other means when an unauthorised person tries to access any system login or user account or any sort of login form.
|
|
|
|
|
So start coding.
If you want someone to do it for you then go to Rent-A-Coder. If you have a specific question then post it here.
|
|
|
|
|
Go away. You're obviously a moron.
|
|
|
|
|
hey i'm sorry fi the prob is not cited properly, but i dont understand why u get rude to me.....
i'm askin is it possible to write code for me to the mentioned problem....
|
|
|
|
|
You've been a "member" for one day, and within about one hour you cross posted into five different forums (everything from ASP.NET to Python to hardware) just stating that you "need" a program. This isn't rentacoder. This site is for helping people who actually make an effort.
|
|
|
|