|
Warm greetings. I am trying to find out if there is a way of editing/updating something on a website using a piece of software made in C#. By this I mean, if the website prompts a user to enter a number for some field and displays it on the site, then can I not carry out the exact same steps in the software so I don't have to go to the website to enter/amend/?
A quick fictional example. I have built a small software related to a random number generator. This software shows two pieces of information independent of each other. One generates any random number by computer and two, shows a number (using a WebClient Class to scrape data from the website) from the website which asks the user to manually enter any random number which then displays on the site.
Now, is it possible to link these two in a way that when a random number is generated by computer in the software, say number 8, this is then updated on the site which will show it rather than manually going to the site and entering number 8 and then showing it. Is there a specific class that exists for this?
I am sorry for it being long but I hope I was being specific, at least enough to give you a good idea of what it is I am seeking. I hope I don't have to learn another programming language to implement this in my software. I am guessing I need to be familiar with HTML with CSS at maximum.
Thank You.
UPDATE: I have been made to realise this process is called two-way data binding, at least under angular js. My question remains, is there a way of implementing this feature in C# language without learning another?
|
|
|
|
|
Sorry, but you are going to have to learn TypeScript (for Angular 2 and up) and probably JavaScript. Don't be afraid of learning other languages - there are plenty of resources that can help you with this.
This space for rent
|
|
|
|
|
Thank you for your reply. Once I have learnt typescript, can I combine the needed feature in my C# project so both of the codes in different languages work in harmony?
Thank You.
|
|
|
|
|
The TypeScript part transpiles to JavaScript which you would run in the browser. The C# side would run on the server.
This space for rent
|
|
|
|
|
I appreciate your valuable reply. So should I learn HTML with CSS and transcript(TS) outside of what I am currently learning which is C#?
And should I just learn TS? I was thinking that if TS is similar to JavaScript (JS), then why not learn JS given its familiarity and resources available online? Or is it because TS would integrate better with C#?
Thank You.
|
|
|
|
|
TS is TypeScript and not TranScript. The reason I recommend learning TypeScript is twofold - it's a lot closer to C# so it will reduce your learning curve and Angular 2 was rewritten in TypeScript and most of the examples you'll find for it online have been written in TypeScript rather than JavaScript.
This space for rent
|
|
|
|
|
Sorry, typing error. So I need to learn Angular 2 with TS? I have done some research on both TS and JS, is it true the exact same code written in TS can be compiled in JS too? The target website, which I would like to use in conjunction with my software is made in JS. I will only be using this website to scrape data off of it and maybe in two places, updating the integer values but using the software and not on the website.
Again, thanks for all your help. I have copied and saved your answers to my notepad for future.
Oh, and this is the website I intend to learn the proposed language from:
Is this fine?
modified 17-May-17 9:15am.
|
|
|
|
|
As I said earlier. TypeScript transpiles to JavaScript so what goes onto your website ultimately ends up as JavaScript.
This space for rent
|
|
|
|
|
|
Sir, I really do appreciate your reply. Thank You
I have looked briefly into the link you shared. So with Document Object Model (DOM), I should be able to manually input a parameter within the software (not even accessing the site like a browser within the C# made software) which then will update that value on the website without the need to access the website and entering 'that' value on there?
Thank You.
|
|
|
|
|
You're in effect creating a C# "bot" to access a website.
It's called: "prototyping".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have Fields contains words like "A,B,C"
i want to count A-B-C and show it in report Viewer
best regards
|
|
|
|
|
And?
What have you tried?
Where are you stuck?
What help do you need?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Hi,
I'm trying to encrypt and send emails using a c# function.
Code segment which encrypt the email as below.
if (Convert.ToString(1).Equals(encryptEmail))
{
const string PR_SECURITY_FLAGS = "http://schemas.microsoft.com/mapi/proptag/0x6E010003";
Object ulFlags = 0x3;
mailItem.PropertyAccessor.SetProperty(PR_SECURITY_FLAGS, ulFlags);
}
The mail goes out successfully as an encrypted email but the problem is it leaves a copy in drafts folder as well.
I don't have any setting to set
SaveSentMessageFolder
Any idea how to get around this?
|
|
|
|
|
A little more code & information would be nice; there really is no way to know what library you are using to create and send the mail.
|
|
|
|
|
Apologies. Here is the full code.
public static void sendMailTest(string emailSubject, string toAddress, string emailBody)
{
_outlookApplication = new Application();
_mapiNameSpace = _outlookApplication.GetNamespace("MAPI");
_outlookInbox = _mapiNameSpace.GetDefaultFolder(OlDefaultFolders.olFolderInbox);
MailItem mailItem = _outlookApplication.CreateItem(OlItemType.olMailItem);
mailItem.Subject = emailSubject;
mailItem.To = toAddress;
mailItem.Body = emailBody;
const string PR_SECURITY_FLAGS = "http://schemas.microsoft.com/mapi/proptag/0x6E010003";
Object ulFlags = 0x3;
mailItem.PropertyAccessor.SetProperty(PR_SECURITY_FLAGS, ulFlags);
mailItem.Send();
}
Please note that _outlookApplication,_mapiNameSpace and _outlookInbox are defined at class level as below
private static Application _outlookApplication;
private static NameSpace _mapiNameSpace;
private static MAPIFolder _outlookInbox;
|
|
|
|
|
|
Are you authorized to print it? You do understand that printing PAN cards at home will be an illegal activity.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
no sir actually this application built only for me for test my knowledge. just i want to check if i m able to do this.
|
|
|
|
|
Member 13123466 wrote: can i use report viewer for this. Quite possibly; if you know how to use a report generator. Alternatively you could just code it straight in C#.
|
|
|
|
|
but the background image and barcode also used in pan card then how we can put this ??
thank you
|
|
|
|
|
Sorry, I have no idea, your question is far too general. You need to do some research to see what features are available with whatever software you plan to use.
|
|
|
|
|
okay....
sir i want to add text box, all shapes ,in panel like select and drop onto panel and this are stretchable and this panel size set by me for printing size as ID Card can i set this??? pls help me
thank you
|
|
|
|
|
Member 13123466 wrote: pls help me How? We have no idea what your program is doing or where you have a problem. If you do not understand the basics of laying out controls on a form then you should go to the Articles section and do some research.
|
|
|
|
|
Is there a way to re-direct the output of a ?wsdl to a listbox?
for example, I'd like to add a button that invokes the following:
http://serverName:port/service.svc?wsdl
and send the output to a listbox
many thanX
|
|
|
|