|
Hi
I want to import the data available in .CSV file to a table(s)in sqlserver db from C#.net.
User has to choose the .csv file from the frontend and the data from that particular chosen file should be imported to database after the client side validation.
I hope for this , we need to read the specified file from the client machine and write it into the server machine,... i dont know how to handle permission issues and all.
Pls help me out how to do this scenario ASAP...
|
|
|
|
|
This is a common question and a quick Google[^] search provides you with plenty of information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
im workingin windows service and i have to notify the user of specific messgae.showing message box is invalid in windows service.any solution.
regards
|
|
|
|
|
Use .NET remoting and have a normal application listening to your service and then pop up a message. NOT good to have a service showing messages!
|
|
|
|
|
Two queations about regular expressions:
(1) Is it possible to define "sub-patterns"?
I have a larger regex containing the same sub-pattern multiple times, e.g.
(?<idA>[a-zA-Z_][a-zA-Z_0-9]*)=(?<idB>[a-zA-Z_][a-zA-Z_0-9]*)
Is it possible to assign a sub-pattern to something (maybe \ö), so that I can use
(?<idA>\ö)=(?<idB>\ö)
?
(2) performance
Are there any general performance guidelines for regular expressions?
I would prefer to break down complex regexes into a few simpler ones sor readability.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist
|
|
|
|
|
I have sometimes used MatchEvaluator delegate. A MatchEvaluator as an event handler that fires when an "OnMatch" event occures. Gives a little stucture to your regex.
And don't try that assignment with a subpattern
|
|
|
|
|
jhaga wrote: And don't try that assignment with a subpattern
hm?
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist
|
|
|
|
|
A subpattern is name on something that has matched. Changing what is matching just don't make any sense. Assign it to a c# variable if you need to do something with it outside the regular expression match.
jhaga
|
|
|
|
|
Oh my, I should have made that clearer I guess I am using the term "subexpression" wrong.
What I would like to see is basically an advanced defiition:
something := [a-zA-Z_][a-zA-Z_0-9]
so that I can use something instead of the sequence on the rhs. (They should match different strings, and I am not looking for a replace - just a match and split into components)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist
|
|
|
|
|
hmm I see. No, you can not have something instead of rhs!
|
|
|
|
|
hi,
My aim's are
1. Sending mails thru a desktop application
2. Monitoring my inbox ..i mean when ever a mail comes to my id it should
come to my desktop application or atleast i must get a alert that mail
has come to me
I have the idea abt the first one but never implemented it ...n i dont know weather the second one is possible or not.................if any one can suggest me ..or give some code to be...any hints i will be thankfull for that.....
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: Monitoring my inbox ..
In which in box you want to monitor, you want to create own mail client.
|
|
|
|
|
hi .....
yes i wanna create own mail client...........
now if i want to monitor my hotmail id ...then what shld i do for that........thanks for ur concern.....
regards
sindhu tiwari
its me sid
|
|
|
|
|
sindhutiwari wrote: if i want to monitor my hotmail id
You need their web services
|
|
|
|
|
sindhutiwari wrote: now if i want to monitor my hotmail id
I am not sure about hotmail's free POP3 support. Search for some articles explaining how to create a POP3 client. Look at the Post office protocol's RFC for getting an idea on how it works.
|
|
|
|
|
Google turned up this[^] for the hotmail issue as they disallowed POP3 and normal IMAP access quite a while ago.
|
|
|
|
|
is there any way by which voice.speak method once begun ended even before completing the reading of the whole document. I ve tried with the SVSFlagsAsync as the second parameter of the speak method and to stop the speech between i have used pause function, but later it cannot resume from the beginning...can i get any ways by which once i stop a speech in between ,i can start again from the beginning...
|
|
|
|
|
Maybe google can help you?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Member 4756709 wrote: is there any way by which voice.speak method once begun ended even before completing the reading of the whole document.
Yes. See this[^] article.
/ravi
|
|
|
|
|
I have a nested repeater that I am trying to sum totals entered by a user, the code behind and repeater code is below. I get a null reference exception: an object reference not set to an instance of an object. the error is at: (((TextBox)parent.FindControl("TextBox2")).Text) = Convert.ToString(compPercent);
How can I get to this control to update, or add a label here?
public void AddComponent(object sender, EventArgs e)
{
int compPercent = 0;
foreach (RepeaterItem repItm in parent.Items)
{
foreach (Control childControl in repItm.Controls)
{
Repeater childRepeater = childControl as Repeater;
if (childRepeater != null)
{
foreach (RepeaterItem child in childRepeater.Items)
{
foreach (Control childControl2 in child.Controls)
{
CheckBox chk = childControl2 as CheckBox;
if (chk != null)
{
if (chk.Checked)
{
//get percent entered
compPercent = compPercent + Convert.ToInt32(((TextBox)child.FindControl("capabilitiesPercentEntered")).Text);
(((TextBox)parent.FindControl("TextBox2")).Text) = Convert.ToString(compPercent);
}
}
}
}
}
}
}
}
ASP Page:
<asp:repeater id="parent" runat="server">
<itemtemplate>
<tr>
<td width="50px"><b>Select</b></td>
<td width="350px"><b><%# DataBinder.Eval(Container.DataItem,"PSO") %></b></td>
<td><b>Enter %</b></td>
</tr>
<asp:repeater id="child" datasource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("myrelation") %>' runat="server">
<itemtemplate>
<tr>
<td><asp:CheckBox ID="CheckBox2" runat="server" />
<asp:HiddenField ID="hidden" runat="server" Value=<%# DataBinder.Eval(Container.DataItem, "[\"PSOComponent_id\"]" )%> /></td>
<td><%# DataBinder.Eval(Container.DataItem, "[\"PSOComponentName\"]")%> </td>
<td><asp:TextBox ID="capabilitiesPercentEntered" Width="40px" runat="server" OnTextChanged= "AddComponent" AutoPostBack="true" /></td>
</tr>
</itemtemplate>
</asp:repeater> <br />
<tr>
<td></td>
<td>Percent Total: </td>
<td><asp:TextBox ID="TextBox2" runat="server" Width="40px" Text="test text"></asp:TextBox></td>
</tr>
</itemtemplate>
<SeparatorTemplate>
<tr><td colspan=3><hr /></td></tr>
<SeparatorTemplate>
</asp:repeater>
</table>
|
|
|
|
|
Try putting your code in <code></code> blocks, and it will be easier for people to read.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
How does one issue an MS-DOS command from a C# program? I want to write a program that issues a command in every sub-directory from a specified directory.
This is written as a Windows application, not a console application.
Thank you,
Glenn
|
|
|
|
|
|
Look at System.Diagnostic and Process...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Given the following class hierarchy:
public class A
{
public virtual void func();
}
public class B : A
{
public override void func();
}
public class C : B
{
public override void func()
{
base.func();
}
}
How can my class C , call the func() implementation in the base class A .
In C++ this could be done by simply specifying the name of the base class, A::func() , but how can I do this in C#?
Thanks for your help.
|
|
|
|