|
If the data is coming in a table say "Table1", then create a trigger on the table to get the data and create the message and put the data in table "Table2". Build a Windows Service which monitors the "Table2" row with some status (say open). Take data and send the email and update the status of the row (say Close or sent).
Otherwise Please provide some more clarity on your question exactly what do you want to do?
|
|
|
|
|
what does this line means or do ??
response.Cookies.Add(myCookie);
|
|
|
|
|
|
|
It adds a cookie to the user's machine.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
help me i connection database but error ..plz help me .thank you
An error occurred while conecting to the database .The database might be unavailable .An exception of type 'Microsoft.Data.ConnectionUI.SqlDatabaseFileUpgradeRequiredException'.The error message is :'This database file is not compatible with the current instance of sql server
|
|
|
|
|
I believe you're not reading the exception. That exception is clear if you just break it down and then read it. Let me read it out for you, "Sql Database File Upgrade Required Exception".
Which means that your SQL file was created in a too older version of SQL Server database, you might need to run the application in a compatible version and upgrade it to a later one, or import the data from it using SQL Server Management Studio.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Hi everyone.
I have to make a quiz that going to certified employee.
When the employee got the passing grade, they can print the certificate.
The quiz is going to be a random multiple chooise quiz and there are also a question bank/
Please kindly help me.
|
|
|
|
|
|
|
I have this Card Processing WSDL. I made a service reference and a web reference for the WSDL.
Long story short, I've only done WSDL once for FedEx, so this is new to me. The FedEx was cut and dry, just make a WEB Reference, and code to it.
This one, the First Data is much more complex. So I made a SERVICE Reference, and coded to it.
You have to generate a EndPoint Behavior, so you can calculate the HMAC data, and attach it to the SOAP request header. That part was fairly easy. I figured out how to call the service, but then I get this error
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.
OK I get it. With a Service Request, you sort of have to be in the same domain, perhaps a web server that runs IIS as well. Where as a WEB Request, you can go cross domain.
So my question is, is there a way to cheat the credentials, using the SERVICE Reference, and continue using this method, or use the WEB Reference, and create a new method of endpoint behavior.
Trouble with the first, is that I really don't want to hard code credentials.
Trouble with the latter, is that I have no clue on how to add a endpoint behavior to the WEB Reference.
What would you do?
Here's some code for to satisfy curiosity for SERVICE Reference
'Bind the transaction to the HMAC Header Behavior
Dim httpBinding As BasicHttpBinding = New BasicHttpBinding()
httpBinding.Security.Mode = SecurityMode.Transport
httpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows
httpBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName
httpBinding.Security.Message.AlgorithmSuite = ServiceModel.Security.SecurityAlgorithmSuite.Basic256
Dim ws = New firstData_v14.ServiceSoapClient(httpBinding, New EndpointAddress(m_endPoint_Url))
ws.ClientCredentials.Windows.ClientCredential = New NetworkCredential("username", "password", "domain")
ws.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation
ws.ChannelFactory.Endpoint.Behaviors.Add(New HMAC_SR_Header_Behavior(m_key, m_keyID, m_endPoint_Uri))
'Transmit the Card Authorization Request
rxn = New firstData_v14.TransactionResult
rxn = ws.SendAndCommit(txn)
WEB Reference
'Bind the transaction to the HMAC Header Behavior
Dim ws = New com.firstdata.globalgatewaye4.V14.Service
'Transmit the Card Authorization Request
rxn = New com.firstdata.globalgatewaye4.V14.TransactionResult
rxn = ws.SendAndCommit(txn)
|
|
|
|
|
Looks like the Service Reference allow me to use the EXact_ID and EXact_Password to authenticate to the Cross Domain Service that runs on a Linux Server.
I'm not quite sure how to authenticate to this server, using the code below. I think I just have a few things wrong here.
I'm not sure if the BasicHttpBinding is my authentication method for credentials, or the channel factory.
'Bind the transaction to the HMAC Header Behavior
Dim httpBinding As BasicHttpBinding = New BasicHttpBinding()
httpBinding.Security.Mode = SecurityMode.Transport
httpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic
httpBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName
httpBinding.Security.Message.AlgorithmSuite = ServiceModel.Security.SecurityAlgorithmSuite.Basic256
Dim ws = New firstData_v14.ServiceSoapClient(httpBinding, New EndpointAddress(m_endPoint_Url))
ws.ClientCredentials.Windows.ClientCredential = New NetworkCredential(sCA.Exact_ID, sCA.Exact_Password)
ws.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.None
ws.ChannelFactory.Credentials.UserName.UserName = sCA.Exact_ID
ws.ChannelFactory.Credentials.UserName.Password = sCA.Exact_Password
ws.ChannelFactory.Endpoint.Behaviors.Add(New HMAC_SR_Header_Behavior(m_key, m_keyID, m_endPoint_Uri))
'Transmit the Card Authorization Request
rxn = New firstData_v14.TransactionResult
rxn = ws.SendAndCommit(txn)
|
|
|
|
|
Hi guys,
I have a project am working on, I have to fill an excel file with data from textboxes, radiobutton lists, etc ..
the excel file must not be opened for the user, it will be used as a database file.
I have 6 columns to fill.
each time the user clicks the button, all data must be added to the first empty row in the excel file.
the problem is, I tried several ideas (connecting database using SQL commands, ODBC, ...) and everytime I encounter a different error, or simply nothing happens .. errors of course are when running the project in the internet browser, so no compilation errors.
the excel file is an EXCEL 2010, the version of VS is 2008.
here's one of the codes I used, for this code I got an error about ISAM driver not found :
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Data.Common
Imports System.IO
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button3.Click
If IsDate(TextBox3.Text) = False Or TextBox3.Text = "" Or TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox4.Text = "" Or RadioButtonList1.SelectedIndex = -1 Then
MsgBox("Veuillez vérifier les champs d'écriture.", MsgBoxStyle.OkOnly, "Champs manquants ou invalides")
Exit Sub
End If
Try
Dim MyConnection As System.Data.OleDb.OleDbConnection
Dim myCommand As New System.Data.OleDb.OleDbCommand
Dim sql As String = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=D:\Data\Excel_File.xlsx;Extended Properties=Excel 12.0 Xml;HDR=YES;")
MyConnection.Open()
myCommand.Connection = MyConnection
sql = "INSERT INTO [feuil1$] (Opérateur, Type_Heures, Date, Heures_Entrée, Heures_Sortie, Tâches) VALUES (@Opérateur, @Type_Heures, @Date, @Heures_Entrée, @Heures_Sortie, @Tâches)"
myCommand.Parameters.AddWithValue("@Opérateur", Label4.Text)
myCommand.Parameters.AddWithValue("@Type_Heures", RadioButtonList1Text)
myCommand.Parameters.AddWithValue("@Date", TextBox3.Text)
myCommand.Parameters.AddWithValue("@Heures_Entrée", TextBox1.Text)
myCommand.Parameters.AddWithValue("@Heures_Sortie", TextBox2.Text)
myCommand.Parameters.AddWithValue("@Tâches", TextBox4.Text)
myCommand.CommandText = sql
myCommand.ExecuteNonQuery()
MyConnection.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
MsgBox("Row Added ")
End Sub
|
|
|
|
|
it's okay guys, I finally solved the problem using this code
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.SqlClient
Imports System.Data.Common
Imports System.IO
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button3.Click
Dim cn As New OleDbConnection
Dim cm As New OleDbCommand
cn = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Data\Excel_File.xlsx;Extended Properties=""Excel 12.0 Xml;HDR=YES""")
cn.Open()
With cm
.Connection = cn
.CommandText = "INSERT INTO [feuil1$] ([Operateur], [Type_Heures], [Date], [Heure_Entree], [Heure_Sortie], [Taches])VALUES (op, th, dt, he, hs, tc)"
cm = New OleDbCommand(.CommandText, cn)
cm.Parameters.AddWithValue("op", Label4.Text)
cm.Parameters.AddWithValue("th", RadioButtonList1.Text)
cm.Parameters.AddWithValue("dt", TextBox3.Text)
cm.Parameters.AddWithValue("he", TextBox1.Text)
cm.Parameters.AddWithValue("hs", TextBox2.Text)
cm.Parameters.AddWithValue("tc", TextBox4.Text)
cm.ExecuteNonQuery()
MsgBox("UPDATE SUCCESSFUL")
cn.Close()
End With
End Sub
|
|
|
|
|
I know that I can retrieve the values in resx files programmaticaly. But, Is there a way to modify the values of existing resx key's? For eg: there is an entry already in the resx file as below:
Key: UsernameReqdValidation
Value: User Name is required.
I want to change this value to 'UserName is mandatory'. Can this can be changed by the user on run time?
I googled for a while, but couldn't find any useful stuff. Please help.
|
|
|
|
|
|
i was reading a signalr private & public chat code and it looks great but few area i just do not understand. i was reading from this url
http://www.tugberkugurlu.com/archive/mapping-asp-net-signalr-connections-to-real-application-users
https://github.com/tugberkugurlu/SignalRSamples/blob/master/ConnectionMappingSample/ConnectionMappingSample/Hubs/ChatHub.cs
public class User {
public string Name { get; set; }
public HashSet<string> ConnectionIds { get; set; }
}
public class ChatHub : Hub {
private static readonly ConcurrentDictionary<string, user=""> Users
= new ConcurrentDictionary<string, user="">(StringComparer.InvariantCultureIgnoreCase);
public override Task OnConnected() {
string userName = Context.User.Identity.Name;
string connectionId = Context.ConnectionId;
var user = Users.GetOrAdd(userName, _ => new User {
Name = userName,
ConnectionIds = new HashSet<string>()
});
lock (user.ConnectionIds) {
user.ConnectionIds.Add(connectionId);
// // broadcast this to all clients other than the caller
// Clients.AllExcept(user.ConnectionIds.ToArray()).userConnected(userName);
// Or you might want to only broadcast this info if this
// is the first connection of the user
if (user.ConnectionIds.Count == 1) {
Clients.Others.userConnected(userName);
}
}
return base.OnConnected();
}
}
i do not understand OnConnected() function very well. so please help me to understand it. why they use
HashSet class ?
if some one see the full code from my given url then please tell me how they could handle users with same name but different connection id?
thanks
tbhattacharjee
|
|
|
|
|
|
where is the answer....? i am looking for answer.
tbhattacharjee
|
|
|
|
|
I think that if a user has multiple tabs or windows open in their web browser then each one will be considered a different web socket connection.
A HashSet isn't something I've used, but I believe it is a high performance List that will never store duplicate values. I would recommend reading the MSDN remarks on the class to make sure you understand what it is:
The reason for this HashSet would be to ensure that all connections to a given user are associated with each other, so that a message intended for that user would be sent to all of his active connections.
I think the idea is that your user name would be a unique value - for example a user logging into your site using their email address. If you wanted to make users share the same visible user name, you would still need to give them a unique identifier to track them with.
I understand that English is probably not your primary language, but is there some specific point in that tutorial link that you sent that you're having difficulty understanding? I'm afraid that without you being more specific I would only be able to repeat whatever is written in that article, and probably only confuse you more.
|
|
|
|
|
My GIF image doesn't stop rotating. It continues just like that. Also If there is some txtbox empty and is required still it shows up Progress and keeps on rotating.
Here is my Code. Can anyone in here help me with this
<script language="javascript" type="text/javascript">
function StartProgressBar() {
var myExtender = $find('ProgressBarModalPopupExtender');
myExtender.show();
return true;
}
function StopProgressBar() {
var myExtender = $find('ProgressBarModalPopupExtender');
myExtender.hide();
return true;
}
function Valid() {
if (Page_ClientValidate("Required") == true) {
StartProgressBar()
}
else {
alert("Please fill the Required fields");
}
}
</script>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="Button" OnClientClick="Valid()" />
<div>
<cc1:ModalPopupExtender ID="ProgressBarModalPopupExtender" runat="server" BackgroundCssClass="ModalBackground" behaviorID="ProgressBarModalPopupExtender" TargetControlID="hiddenField" PopupControlID="Panel1" />
<asp:Panel ID="Panel1" runat="server" Style="display: none; background-color: #C0C0C0;">
<asp:Image ID="Image3" ImageUrl="~/Images/712Blue.GIF" runat="server" AlternateText="" />
</asp:Panel>
<asp:HiddenField ID="hiddenField" runat="server" />
</div>
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
If Page.IsValid Then
Thread.Sleep(300)
ProgressBarModalPopupExtender.Hide()
ClearAll()
End If
End Sub
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
So you put a progress bar in a modal extender?
Must people just use the updateProgress control. I do it in code, but it's been years since I built one on the webform, so I won't be much help on that.
I don't know about the textbox issue.
Create Modal Popup in Ajax UpdateProgress[^]
|
|
|
|
|
Of course Modal extender is in Update panel. It is an Ajax control. So it wont work if it is not in update panel. But issue here is I added a Validation group and checking in JavaScript. Even after checking Validation why is it still showing progress bar when validation failed. That is making progress bar to rotate continuously. But couldn't figure how to solve it.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I said update progress, not update panel
The update progress shows the progress content only during postback, and then it disappears.
You attach it to the update panel.
Animated gifs go round and round, that's what there suppose to do. Perhaps you mean that the image won't go away or hide, or the div element that contains the image won't hide or go
display: none
|
|
|
|
|