|
In simple words YES it is possible. Just google for some libraries or controls/components which can help you just do it for you. There are a lot of free libraries available for it; including libraries written in javascript
|
|
|
|
|
|
I have to give a two hour introductory lesson to a group of C++ and Delphi programmers on EF next week. I'd like some advice on the group of topics I should present and the scope and depth of those topics. This will not be the last lesson, so I can defer a lot of deeper details.
|
|
|
|
|
For starters, there are 2 main focuses when it comes to EF that would make an interesting introductory talk:
1) Code first
2) Database first
Talk about how one can (1) create a model in code and have EF generate the database; and (2) how one can use an existing database to generate a (code) model.
(Of course, the assumption is that SQL Server is the dbms).
|
|
|
|
|
I have a webserver that will be running an ASP.NET application and a WCF service.
The ASP.NET application would require the user to log in before he/she can use the WCF service. I want to handle the sessions so that the user will be logged out automatically after a period of time.
This is where I'm stuck, for the WCF application, I can check that the user is still using the system (i.e. the session gets updated every time the WCF application is called) but for the ASP.NET side, I'm just wondering how can I go about joining these 2 together. Because currently, the ASP.NET application would log the user off since what is happening after login doesn't touch the ASP.NET application which means that the user cannot access the WCF service.
I want to know if I can manually handle the ASP.NET sessions?
Thanks.
|
|
|
|
|
|
You can maintain multiple session to manage it. you can create your own session as well.
Regards
Keyur Satyadev
|
|
|
|
|
mission, I want to ask, fitting I kept running there is a message like this: Data type mismatch in expression critria. Who knows not,? I use an Access database ...
|
|
|
|
|
Without some details of your table and the command you are using it is impossible to guess.
Use the best guess
|
|
|
|
|
the sintaks:
Sub SetText(ByVal text As String)
If TextBox1.InvokeRequired Then
Dim d As SetTextCallback = New SetTextCallback(AddressOf SetText)
Invoke(d, New Object() {text})
Else
TextBox1.Text = text
End If
Try
Dim Nim As String = Nothing
Dim Nama As String = Nothing
Dim Tanggal As String = Nothing
Dim No_Telepon As String = Nothing
Dim Pesan As String = Nothing
Dim Status As String = Nothing
Dim arrString As String()
arrString = Split(text, ";;;")
Pesan = arrString(1)
'Nim = arrString(2)
'Nama = arrString(3)
'Jam = arrString(5)
Call Koneksi()
DML.Connection = Database
DML.CommandType = CommandType.Text
DML.CommandText = "insert into TBlSMSMasuk(Nim, Nama, Tanggal, NO_Telepon, Pesan, Status) Values ('Nim','Nama','Tanggal','NO_Telepon','Pesan','0')"
DML.ExecuteNonQuery()
MsgBox("ada SMS masuk, silakan direfresh")
'Call Atur()
Catch ex As Exception
MsgBox(ex.ToString())
End Try
End Sub
I am using an Access database
I've likened to a query from database syntax but still there is a message like that, I wonder why?
|
|
|
|
|
You need to check the type of your database fields. This message indicates that the value being sent does not match the type expected by one of the fields in the table you are updating.
Use the best guess
|
|
|
|
|
Well, look: you do not insert "real" values, but the names of the fileds: Values ('Nim','Nama','Tanggal','NO_Telepon','Pesan','0')
And did you really design the Tanggal column to be a varchar column instead of DateTime? And is Status a varchar instead of an int?
Better use a parameterized query, something like
insert into TBlSMSMasuk(Nim, Nama, Tanggal, NO_Telepon, Pesan, Status) Values (@Nim,@Nama,@Tanggal,@NO_Telepon,@Pesan,@Status)
and then add the parameter values like
DML.Parameters.AddWithValue(@Nim, Nim);
etc. (Assuming that DML is an IDbCommand object)
|
|
|
|
|
mean because I am still learning how visual basic.net?
and that adds to the value of the parameter like this:
DML.Parameters.AddWithValue (@ Nim, Nim);
DML.Parameters.AddWithValue (@ Name, Name);
DML.Parameters.AddWithValue (@ Date, Date);
DML.Parameters.AddWithValue (@ NO_Telepon, NO_Telepon);
DML.Parameters.AddWithValue (@ Message, Message);
DML.Parameters.AddWithValue (@ Status, Status);
or like how the detail because I still learn visual basic.net .., please,, thanks,,?
|
|
|
|
|
Almost.
Dim Message as String = "Selamat Programming!"
...
DML.Parameters.AddWithValue("@Message", Message);
|
|
|
|
|
I want to ask, the difference between the insert into TBlSMSMasuk (Nim, Name, Date, NO_Telepon, Message, Status) Values (@ Nim, @ Name, @ Date, @ NO_Telepon, @ Message, @ Status) and "insert into TBlSMSMasuk (Nim, Name, Date, NO_Telepon, Message, Status) values ('"+ Nim +"', '"+ name +"', '"+ Date +"', '"+ NO_Telepon +"', '"+ message +" ',' "+ status +" ') ", what is it,?
|
|
|
|
|
I added the ionic.dll file in my solution's bin and then added a new folder with the name zipmyfiles.There is a compile time error which i am not able to find a solution. please help me out.
Compiler Error Message: CS1061: 'ASP.about_aspx' does not contain a definition for 'btnZipFile_Click' and no extension method 'btnZipFile_Click' accepting a first argument of type 'ASP.about_aspx' could be found (are you missing a using directive or an assembly reference?)
|
|
|
|
|
Member 10175264 wrote: are you missing a using directive or an assembly reference? You do not have a declaration for btnZipFile_Click in your code.
Use the best guess
|
|
|
|
|
Hello could anybody Help me about passing the value of a textbox from form using Ajax Actionlink. It's been whole day figuring out still I'm getting value of null.
Im using pure Ajax Action link with out Any button.
here is the sample of delete ajax action link works perfect!
http:
But using it in form collection the value always null. Any help Appreciated Thanks!
here is my code:
CustomerVIEW
<% using (Html.BeginForm())
{ %>
<%= Html.TextBoxFor(model => model.Fname, new { id = "Fname" })%>
<%= Html.TextBoxFor(model => model.Lname, new { id = "Lname"})%>
<%= Ajax.ActionLink("Create", "Create",
new { id = 1},
new AjaxOptions {
HttpMethod="POST",
OnFailure = "function() { alert('fail'); }",
OnSuccess = "function() { alert('success'); }"
})%>
}
------------------------------------------------------------------------
CustomerController
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Create(FormCollection formCollection)
{
clsCustomer objcustomer = new clsCustomer();
clsSession objSession = new clsSession();
objcustomer.Fname = formCollection["Fname"]; --> NULL
objcustomer.Lname = formCollection["Lname"]; --> NULL
}
|
|
|
|
|
You should try the ASP.NET forum.
Use the best guess
|
|
|
|
|
I am writing a windows application In VS2010.
I am mapping a webdav drive after successful login.
How Can i watch evens in that drive using c# evens?
Events may be renaming a text file in that drive.
FileSystemWatcher is working with normal drives but not with virtual drives.
Please help me with any solution
Regards
Anish
|
|
|
|
|
FileSystemWatcher works with UNC shares on Windows Servers. Without knowing what your code looks like and what the server is your drive is on, it's impossible to tell you what's wrong with any accuracy.
|
|
|
|
|
I want to create upload file to the server drive c. But there is user credentials require to access the server file path. So i use this code in app.config
<configuration>
....
<appSettings>
<add key="DocumentVault" value="\\10.100.100.10\C$\SomePath\SomeWhere\Else\"/>
</appSettings>
....
</configuration>
How to add the user credentials inside?
|
|
|
|
|
Why are you using an Admin share, C$?? Why not just create a share directly on the target folder and set appropriate permissions for the user account(s) or group(s) you're using?
|
|
|
|
|
hueikar wrote: How to add the user credentials inside? You can't add them to a UNC-path; by doing so, it's no longer a UNC-path. Your best option is to save them separately, and to connect from code[^].
(..and, as Dave remarked, it's not a very good idea to be storing the password of the local admin in a human-readable file!)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello all, first time posting here.
At my workplace, we have a requirement to ship a program with as little button pressing as possible. The users on the other end are factory workers and it's well known that if you give them an option, they will misuse it. Anyhow.. the program is going to be written in .NET with WPF. We have to work under the assumption that the machines do not have .NET installed and they can't install it.
Now before I ask the question, which is more of a general "what if", please note, I am not interested in anything but what I am about to ask. For example "oh just install this", or "Oh, not possible". After doing many hours of research, what I ask IS in fact possible, because commercial programs do this (spoon studio, boxed app).
I am an advanced developer, so I know my way into some scary places in the Win32 API and also have been developing in .NET / Win32 / C++ for many years. My current job (past year) has been mainly with embedded C, so I am just getting back to Win32 stuff heavily.
So the subject of the question says it all. I want a standalone .NET exe in which the user does not have to install anything AND of which does not copy any temporary file to the file system. Using the commercial options (spoon studio / boxed app) are not possible, because they are not free, and this has to be a free solution for us.
So here is the meat of what I want to do. I want to make a CLR host that essentially calls into the mscoree.dll to host our .NET application pulling in all the dependencies that mscoree.dll needs. Where do these files come from if we cannot copy any temporary files you ask?: The Dll's are to be stored in the exe itself as resource files.
The Win32 loadlibrary function works only from files on the file system. However, after poking around with Win32 hooking, it has been discovered that LoadLibrary uses ZwOpenFile internally to get a handle to the file you pass in. ZwOpenFile can also not work with anything but a file system file that I am aware of.
Here is my idea. We hook ZwOpenFile using extended code overwriting. After disassembling NTDLL.dll, this is possible, because the prologue to the function is more than 5 bytes. Next, our custom function gets called. Thirdly, ZwOpenFile passes back a PHANDLE pointer to the opened file. How can we rejigger this PHANDLE pointer instead of using ZwOpenFile? How about CreateFile? Using CreateFile, you can pass in a named pipe. CreateFile returns a HANDLE pointer that I ASSume can be assigned to the ZwOpenFile PHANDLE parameter. I don't have a lot of experience with named pipes and what not, but this is just an idea. Maybe there is another way. Basically we get the dll file required by LoadLibrary from the resource stored in the exe originally. Using this block of memory, which is actually the dll itself, we can map it into something so that CreateFile gives us a handle that ZwOpenFile can pass back to LoadLibrary. Now, the big question is... is a file handle created with CreateFile 'compatible' with a PHANDLE that ZwOpenFile passes back. I am guessing that the structure is the same, BECAUSE I also tinkered with hooking the CreateFile API which uses ZwCreateFile internally. Thus, a PHANDLE from ZwCreateFile (which would give us a memory handle to the image instead of a required disk file) should be compatible with ZwOpenFile.
The mscoree.dll also requires some registry keys. I also looked at some registry key functions in a disassembler and it is also possible to hook these. However, I have not worked out the interaction of the registry keys and where they are used yet.
This is just my idea, but hopefully there are some constructive minds out there with more information on the subject. We really want the standalone .NET exe so that we can avoid writing a native Win32 program. PS, I am not interested in using anything other than .NET and WPF: no QT, no mono + GTK, no whatever, so please do not bring those options up.
I would treat this as more of a "what if" question besides trying to worry about what is happening with why I am asking the question.
Thanks
|
|
|
|
|