|
no not school work . this is my comapany work making app for bank
|
|
|
|
|
Eh?
Then I suggest you find commercial solutions that do that already. Many, many of them.
I suspect there are free ones as well.
You shouldn't be attempting to code any of this.
|
|
|
|
|
Hi, I am facing this error how to remove it: Cannot implicitly convert type 'WebApplication1.SharePoint Online Credentials' to 'System.Net.I Credentials'. An explicit conversion exists (are you missing a cast?) My Code is here:
protected void Page_Load(object sender, EventArgs e)
{
using (ClientContext clientContext = new ClientContext("https://------------.sharepoint.com/sites/Solutions/"))
{
SecureString passWord = new SecureString();
foreach (char c in "----------".ToCharArray()) passWord.AppendChar(c);
clientContext.Credentials = new SharePointOnlineCredentials("---------@---------.onmicrosoft.com", passWord);
List list = clientContext.Web.Lists.GetByTitle("Cases");
CamlQuery query = new CamlQuery();
query.ViewXml = "<View/>";
Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(query);
clientContext.Load(list);
clientContext.Load(items);
clientContext.ExecuteQuery();
DataTable dt = new DataTable();
dt.Columns.Add("Title");
dt.Columns.Add("Email_Address");
dt.Columns.Add("occupation");
dt.Columns.Add("PlaceOfCity");
dt.Columns.Add("Mobile_Number");
foreach (Microsoft.SharePoint.Client.ListItem item in items)
{
dt.Rows.Add(item["Title"].ToString(), item["Email_Address"].ToString(), item["occupation"].ToString(), item["PlaceOfCity"].ToString(), item["Mobile_Number"].ToString());
}
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
[Edited to remove password, email and site details]
modified 14-Jun-17 3:36am.
|
|
|
|
|
Member 13250512 wrote: An explicit conversion exists (are you missing a cast?) What part of that message is confusing you?
|
|
|
|
|
|
hello i wanted to develop encryption and decryption. using public key and private key. in c#
i have search lot of think on that topic but still have some issue.
please help me how to create public key and private key.
|
|
|
|
|
|
Hello,
I have a portable instruments with Celeron processor and Windows 10.
I notice that Celeron as an I2C.
Can I use I2C with .NET framework ?
Thankyou
|
|
|
|
|
I am not sure whether .NET framework has an implementation of that driver, or you might want to go a bit deeper using C++ for CLR. Somehow, looking at a few Google search results I can say community is working on it. The following links show the I2C bus communication through a few community-led projects, samples, since there is no native support (or interest) in the .NET framework.
How to use i2C driver in C# ?? - FriendlyARM
GitHub - mshmelev/RPi.I2C.Net: Library for working with I2C bus on Raspberry Pi
This github library has a sample code that shows how to connect,
using (var bus = RPi.I2C.Net.I2CBus.Open("/dev/i2c-1"))
{
bus.WriteByte(42, 77);
}
Also, for Windows IoT there is a post here that you can use to learn how .NET can be used there, C# for I2C Devices on Windows 10 IoT Core | Jeremy Lindsay, this will be much of Windows Runtime and not .NET framework.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hello,
I have to develop a c# program on Windows 10 on an embedded PC for a portable instrument.
The instrument has two keyboard attached.
One keyboard is optional: the user can connect to the PC a normal keyboard.
The other keyboard is always connected to the instrument and has special function that, in a normal keyboard, are F1...F12, arrows, tab, or other.
My problem is to detect in "PreviewKyDown" which keyboard has fired the event.
Can someone help me ?
|
|
|
|
|
You can't - keyboard data isn't "tagged" with a source in any way. The only way to do that would be to write custom drivers for your keyboards, and that is a huge amount of work!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
thank al lot
|
|
|
|
|
Welcome! Sorry it's bad news...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
No problem, ... we are moving to another solution
|
|
|
|
|
i came across itext dll for visual basic to do a form fill ; can I use it with c# ? are there any compatibility issues?
|
|
|
|
|
Provides it's a .NET assembly, it doesn't matter what language the DLL file was written in: it can be used from any language which supports .NET.
So yes, you can use a VB DLL (or EXE) assembly from a C# program as if it was a C# file.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
A minor correction. You can only guarantee that you can use a DLL from one .NET assembly in another if it is inherently CLSCompliant. That's not to say that you can't use an assembly that is marked as CLSCompliant(false), but there's no guarantee that you can.
This space for rent
|
|
|
|
|
I stand corrected!
Or more literally, I sit corrected because it's easier to type...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
There is no way to know without either trying it, reading the documentation, or contacting whoever made it. We have no idea what dll you are referring to so we really can't say. Just try it and find out. That's the easiest thing to do.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Please help me... I am stuck up with http post using http request.
I have an asp.net applicaton which is hosted locally in IIS(http:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Test Web Page</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
function showImage() {
alert('hi');
}
</script>
</head>
<body>
<form id="imageForm" name="imageForm" method="post" action="Default.aspx" >
<input type="text" name="showImage" value="false" />
<input type="submit" name="refresh" value="submit" onclick="showImage();" />
</form>
</body>
</html>
My Default.aspx.cs ;
protected void Page_Load(Object Source, EventArgs E)
{
}
I have a separate c# application which tries to simulate the button click of "refresh" via http post to Default.aspx, here is the code;
string url = "http://localhost/TestWebPage/Default.aspx";
string postDataStr = "showImage=true";
postDataStr += "&refresh=submit";
byte[] postData = Encoding.ASCII.GetBytes(postDataStr);
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = postData.Length;
req.Proxy = WebRequest.DefaultWebProxy;
using (var reqStream = req.GetRequestStream())
{
reqStream.Write(postData, 0, postData.Length);
}
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream, Encoding.Default);
string pageContent = reader.ReadToEnd();
string status = ((HttpWebResponse)response).StatusDescription;
reader.Close();
responseStream.Close();
response.Close();
My aspx page is already opened in a chrome browser. When the above code is executed, I want the javascript alert in the showImage() function to be displayed in the Default.aspx page in the same browser window itself.
Unfortunately its not happening now... am I missing anything? or is there any good approach to simulate the button click using separate c#?
Please guide.
|
|
|
|
|
The clicks are on the client-side, not the server-side and should never be injected through server-side. That said, you can simulate the click in JavaScript easily, or if the purpose is to just trigger the function you can call the function on the body's load event as well. That would be much better and semantically correct code in your application.
<body load="onLoadFunc()">
<!--
</body>
Then you can write the function, that gets executed on the load,
function onLoadFunc() {
showImage();
}
This will execute the function, as soon as the body finishes loading, thus on the page load. This will be a better approach, as compared to any of the code injections from server.
load - Event reference | MDN
If you want to get a response from the server, and then execute the code on client-side, then I would recommend that you read a bit about Ajax first. Ajax will let you do that easily, that is also JavaScript based service, so please learn more of JavaScript here to perform tasks on client-side.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Prasadaknair wrote: My aspx page is already opened in a chrome browser. When the above code is executed, I want the javascript alert in the showImage() function to be displayed in the Default.aspx page in the same browser window itself.
You're loading the page in an external process, and expecting the response to affect the page in a totally different process?
That's never going to work, for obvious reasons.
If you want to control an existing browser, you'll need to look at using something like Selenium WebDriver[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am trying to fetch data from an API using C# but every time i get 404 error. What can be the problem, is the API is prevented by my firewall or anti virus problem. The API url is totally correct and I have checked it many times.
|
|
|
|
|
What happens if you try to access the API URL directly from your browser?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|