|
Member 2122963,
I don't have an answer for you, but why are you using batch to just start notepad?, why not just it all in C# ?
Regards,
Gareth.
|
|
|
|
|
Hi
looking at the code, i don't think the problem is the detection of the question or the writeline of "y". to me, it looks like the problem is here:
while (!rd.EndOfStream)
{
change it to
while (!pepprocess.HasExited)
{
if it doesn't help go step by step through the code and look what happens..
greets
m@u
|
|
|
|
|
hi all
i have resolved the problem.here is the code
aspx page
<html xmlns="http://www.w3.org/1999/xhtml" ><br />
<head runat="server"><br />
<title>Untitled Page</title><br />
<script type="text/javascript"><br />
<br />
function SelectAll(id) {<br />
var frm = document.forms[0];<br />
for (i=0;i<frm.elements.length;i++) {<br />
if (frm.elements[i].type == "checkbox") {<br />
frm.elements[i].checked = document.getElementById(id).checked;<br />
}<br />
}<br />
} <br />
</script><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<div><br />
<asp:GridView ID="GridView1" runat="server" Width="400px" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"><br />
<Columns><br />
<asp:BoundField DataField="PersonID" HeaderText="PersonID" InsertVisible="False"<br />
ReadOnly="True" /><br />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /><br />
<asp:TemplateField><br />
<%--<AlternatingItemTemplate><br />
<asp:CheckBox ID="CheckBox1" runat="server" /><br />
</AlternatingItemTemplate>--%><br />
<ItemTemplate><br />
<asp:CheckBox ID="CheckBox1" runat="server" /><br />
</ItemTemplate><br />
<HeaderTemplate><br />
<asp:CheckBox ID="cbSelectAll" runat="server" Text="Select All" /><br />
</HeaderTemplate><br />
<HeaderStyle HorizontalAlign="Left" /><br />
<ItemStyle HorizontalAlign="Left" /><br />
</asp:TemplateField><br />
</Columns><br />
</asp:GridView><br />
</div><br />
</form><br />
</body><br />
</html>
code behind
protected void Page_Load(object sender, EventArgs e)
{
BindGrid();
}
private void BindGrid()
{
string Connstr = "connection string";
SqlConnection Conn = new SqlConnection(Connstr);
string str = "select * from emp";
SqlCommand cmd = new SqlCommand(str, Conn);
Conn.Open();
DataSet ds = new DataSet();
SqlDataAdapter Adap = new SqlDataAdapter();
Adap.SelectCommand = cmd;
Adap.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
//adding an attribute for onclick event on the check box in the header
//and passing the ClientID of the Select All checkbox
((CheckBox)e.Row.FindControl("cbSelectAll")).Attributes.Add("onclick", "javascript:SelectAll('" + ((CheckBox)e.Row.FindControl("cbSelectAll")).ClientID + "')");
}
}
pintoo
|
|
|
|
|
Hi Chithra,
What is the problem? Please explain the problem.
|
|
|
|
|
have a look into my last post(posted 24th march).it is in the 5th page of c# message board.
pintoo
|
|
|
|
|
what is the question
|
|
|
|
|
I've two tables and while insertion I've to face lazy response. The query takes much time to insert record. Any suggestion is welcomed. I'm usiing SQL Server 2000.
Thanks
Syed Shahid Hussain
|
|
|
|
|
Syed Shahid Hussain,
What are you asking for? Ways to speed up the insert?
Well, you'll need to give us some code to see what you currently do, and how many rows are you inserting?, also, have a google for Bulk Copy (BCP) or read http://www.codeproject.com/KB/database/SqlBulkCopy.aspx[^]
|
|
|
|
|
one way you can speed up insertion is using stored prcedure which is precompiled code.
try to use store proc plz
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
Hi syed,
You can check
1. whether over indexing is used in the table.
2. use stored procedure.
3. whether u r inserting multiple records at a time?
4. please give complete picture of your work.
Sarvesh Upadhyay
Senior Software Engineer
Birlasoft India Ltd.
Microsoft Certified Professional Developer in Dotnet 2.0 Enterprise Application
|
|
|
|
|
My Dears I am new in using MyNeoReport as reporting for .Net applications.
I would really appreciate if i could have some reference for using MyNeoReport.
you are the most welcome to assist me plz.
Abdul Rahaman Hamidy
Senior Student Student in Computer Science
Kabul, Afghanistan
Software Developer
|
|
|
|
|
I doubt anyone here has heard of it, does it not offer any support ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
There is a tutorial for this here[^] on Code Project.
|
|
|
|
|
hi
I am doing a project in which i have two forms
frmMain and frmTest
in the frmTest i am having a rich textbox and a static string declared;
so from the frmMain i am setting the string value to some text; and then i am creating a object of that form and showing it
This was running perfect till yesterday
today i have a peculiar problem
its giving a exception
"
SEH Exception was unhandled
External Component has thrown an exception " Please tell me how to solve this
THANK YOU
*** Why EXPERTS behave like a fool ***
|
|
|
|
|
Firstly, there are better ways of passing data from one form to another than using public static members (think constructor arguments or properties). Secondly, please post what exception you are seeing and maybe a stack trace.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
What you're doing is nasty as all hell. There's an excellent article on cP on how to share data between forms. The short version - use delegates.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
if i say
Enter your full name :Peter Alian Smith
So this name has to be start from char no space from starting name.
once user write his first name only one space allow not more then one space.
again user write his middle name and only one space allow not more then one space...
So is that anyone can help me.what should i use ?
-Thanks
Peter
|
|
|
|
|
Why do you need it to be so strict ?
The Trim method removes leading and trailing spaces. A regex or a split and then rejoining with only one space would fix the rest.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
is there any other method i can use here ?
Peter
|
|
|
|
|
You mean, you tried Christian's suggestion and it didn't work?
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Once we figured out that taking our shoes and socks off would double our counting ability the technical glitch was quickly rectified. -- Chris Maunder, from the CP newsletter
|
|
|
|
|
Why ? Are you thnking I am trying to keep the good methods a secret ?
A regex is your best bet. Splitting and rejoining the string is more code, and messier, but perhaps easier to understand. If you don't want either of those methods, I recommend prayer.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: keep the good methods a secret
Yeah, let's not tell him about
name = name.Trim().Replace ( "\t" , " " ).Replace ( " " , " " ) ;
as it's far too advanced.
|
|
|
|
|
i want to execute a code once in 24 hours..how do i do this in C#.NET..
plz..urgent..
Kaveri..
|
|
|
|
|
kaveri2604 wrote: plz..urgent..
But not urgent enough to use google ?
If the book you're using doesn't cover timers, it probably lacks in other areas. Buy a better book, and keep applying yourself.
Or try here[^].
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,i need change the following code into an array..But it shows error whn i change it..Here is the coding..
string hex = "03D";
int code = Convert.ToInt32(hex, 16);
richTextBox1.Text = Encoding.Default.GetString(new byte[] { (byte)code });
I need insert about 5 hexadecimal value..Pls help me..Thank you.
KAM83
|
|
|
|