|
Countered the 1 vote
C# has already designed away most of the tedium of C++.
|
|
|
|
|
Thanks, amazing how angry some people get when we won't do their work for them.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
To send sms though code you will need some third party sms gateway provider.
the code will differ for all the service providers but it will be very simple and the integration will be matter of minutes. I suggest you try to find some third party sms gateway provider that fits your needs and then implement the functionality as per its API.
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.
|
|
|
|
|
you need to buy sms pack from like www.smsgatewaycenter.com these websites also provide developer code you have just to apply it
you need to search first
|
|
|
|
|
At my company I am told that I need to setup a web service with an 'xsd' file I will be receiving tomorrow morning. I have a visual studio.net 2010 professional version development software to work with and I have experience using C# 2010.
Since I have not setup a web service before, I am wondering how to setup the web service from scratch? All I want to do is have the web service that only works with the *.xsd file.
Thus can you tell me and/or point me to a reference on how to setup this web service?
|
|
|
|
|
hello
i published my website and hosted on IIS.when i run the site as http://localhost/employee/emp.aspx ,every thing goes fine.it displays the page.
But when i run it using my system ip address as http://10.40.5.140/employee/emp.aspx , it displays
'You are not authorized to view this page
You do not have permission to view this directory or page using the credentials that you supplied.
Please try the following:
Contact the Web site administrator if you believe you should be able to view this directory or page.
Click the Refresh button to try again with different credentials.
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.
Internet Information Services (IIS)
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the words HTTP and 401.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Authentication, Access Control, and About Custom Error Messages.'
how to run i using my system ip address.
thank you.
|
|
|
|
|
|
How to populate data table in to jqgrid ? ? please help
Using Webservice or any other method?
|
|
|
|
|
The following is the code for combobox along with its custom validator
<asp:ComboBox ID="cmbBusinessOwner" runat="server" MaxLength="0" DropDownStyle="DropDownList"
AutoCompleteMode="SuggestAppend">
<asp:ListItem Text="--Select--" Value="0" />
<asp:ListItem Text="HDFC Co-op" Value="1" />
<asp:ListItem Text="Limited Dividend Co-op" Value="2" />
<asp:ListItem Text="Rent Controlled" Value="3" />
<asp:ListItem Text="Rent Stablized" Value="4" />
<asp:ListItem Text="India" Value="5" />
<asp:ListItem Text="United" Value="6" />
<asp:ListItem Text="America" Value="7" />
<asp:ListItem Text="Mexico" Value="8" />
</asp:ComboBox>
<asp:CustomValidator ID="cvRequired" runat="server" ValidationGroup="Continue" ForeColor="Red"
ClientValidationFunction="cvComboBox_Validate" Text="Select Business Owner" Display="Dynamic"></asp:CustomValidator>
the script for cvComboBox_Validate function is
function cvComboBox_Validate(source, args) {
var ComboBoxCtrl = $find('cmbBusinessOwner');
if (ComboBoxCtrl.get_textBoxControl().value == "--Select--")
args.IsValid = false;
else
args.IsValid = true;
}
This code gives me the error message "Select Business Owner" next to the control on button click. But the message "Select Business Owner" fails to appear in validation summary.
My validation summary is as follows
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="false" EnableClientScript="true"
CssClass="validationsummary" ValidationGroup="Continue" DisplayMode="BulletList"
HeaderText="<div class='validationheader'> Please correct the following errors:</div>" />
Rest all the control on the page works fine except for this combobox.
Help will be greatly appreciated.
Thanks
|
|
|
|
|
It's been over 5 years since I've used one of those valicators, but on a dropdownlist, you have to add the default value to the validator for it to work on a dropdownlist. I don't remember the exact use, but I think it's
<asp:CustomValidator ID="cvRequired" runat="server" ValidationGroup="Continue" ForeColor="Red" defaultvalue="0"
ClientValidationFunction="cvComboBox_Validate" Text="Select Business Owner" Display="Dynamic"></asp:CustomValidator>
Without the default value, the validator has no clue what to validate.
|
|
|
|
|
Thanks for the reply.
The defaultvalue="0" does not work either.
The problem isn't that the validation does not work. It works fine. I see the message displayed next to the combobox control on button click.
The issue is that the validationsummary does not capture this custom validator.
|
|
|
|
|
[EDIT]
your missing the validation group on the combobox
[End of EDIT]
I've never used the validation summary, can't tell you why it doesn't work with the combo box.
All I can say is that you missing something, or mistyped a value like the validation group name.
I stopped using the validation controls about 4 years ago, because I found that they were unreliable, and got too many complaints about them. Across all the computers in the world, they just didn't work on all of them. Go Figure.
Now I do real time validation, in which I validate each time the field changes, and validate again before submission, and validate again on the server side. At the same time, I check for script injection, and correct values on the fly, or offer a list of suggestions.
All in Javascript.
|
|
|
|
|
real time validation --- sounds interesting..
can you given an example.... say with respect to a textbox..
how will you validate them with the different scenario you mentioned("I validate each time the field changes, and validate again before submission, and validate again on the server side. At the same time, I check for script injection, and correct values on the fly, or offer a list of suggestions.")
Thanks
|
|
|
|
|
i use jquery
I bind an event called blur to the textbox, when the user changes fields, the blur is fired, and validates the textbox. I can then format the data, if the value is not correct, then you can paint a red border around the entire area, and change the background color of the textbox.
A red border around the textbox is more visible and non-intrusive than a giant validation message.
A Jquery file designed to work with an update panel. It validate a textbox for an email address. This is one of the designs I use. I have many designs.
$(document).ready(function () {
initiateBinding();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
});
function EndRequestHandler(sender, args) {
initiateBinding();
}
function initiateBinding() {
$(document).ajaxStart(function () {
});
$(document).ajaxStop(function () {
});
$('[id*="_txt_Email_Jquery_FriendsName_Field"]').blur(function() {
validate_Email();
});
}
function validate_Email() {
var validation_Flag = true;
var txtFocus;
var txtError;
txtFocus = $('[id*="_txt_Jquery_txtFocus"]').val();
txtError = $('[id*="_txt_Jquery_txtError"]').val();
var friendsName_length;
friendsName_length = $('[id*="_txt_Email_Jquery_FriendsName_Field"]').val().length;
if (friendsName_length < 2) {
$('[id*="_txt_Email_Jquery_FriendsName_Field"]').css('background-color', txtFocus).fadeOut("slow");
$('[id*="_txt_Email_Jquery_FriendsName_Field"]').css('background-color', txtError).fadeIn("slow");
$('[id*="_img_Email_Jquery_FriendsName_Error"]').delay(800).fadeIn(300).show("normal");
validation_Flag = false;
}
else if (friendsName_length > 2) {
$('[id*="_txt_Email_Jquery_FriendsName_Field"]').css('background-color', txtError).fadeOut("slow");
$('[id*="_txt_Email_Jquery_FriendsName_Field"]').css('background-color', txtFocus).fadeIn("slow");
$('[id*="_img_Email_Jquery_FriendsName_Error"]').fadeOut(500).hide("normal");
}
var emailAddress_length;
emailAddress_length = $('[id*="_txt_Email_Jquery_EmailAddress_Field"]').val().length;
if (emailAddress_length < 2) {
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', txtFocus).fadeOut("slow");
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', txtError).fadeIn("slow");
$('[id*="_img_Email_Jquery_EmailAddress_Error"]').delay(800).fadeIn(300).show("normal");
validation_Flag = false;
}
else if (emailAddress_length > 2) {
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', txtFocus).fadeIn("slow");
$('[id*="_img_Email_Jquery_EmailAddress_Error"]').fadeOut(500).hide("normal");
var re_EmailAddress = new RegExp("\\w+([-+.']\\w+)*@\\w+([-.]\w+)*\\.\\w+([-.]\\w+)*");
var txt_EmailAddress_Validate = $('[id*="_txt_Email_Jquery_EmailAddress_Field"]').val();
var match_EmailAddress = re_EmailAddress.exec(txt_EmailAddress_Validate);
if (match_EmailAddress == null) {
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', txtFocus).fadeOut("slow");
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', "#C6DEFF").fadeIn("slow");
$('[id*="_img_Email_Jquery_EmailAddress_Error"]').delay(800).fadeIn(300).show("normal");
$('[id*="_lbl_Email_Jquery_EmailAddress_Label"]').text("Your format is not valid! (eg. someone@domain.com)").delay(800);
validation_Flag = false;
} else if (match_EmailAddress !== null) {
$('[id*="_txt_Email_Jquery_EmailAddress_Field"]').css('background-color', txtFocus).fadeIn("slow");
$('[id*="_img_Email_Jquery_EmailAddress_Error"]').fadeOut(500).hide("normal");
$('[id*="_lbl_Email_Jquery_EmailAddress_Label"]').text("Enter your friends email address:").delay(500);
}
}
if (validation_Flag == true) {
$('[id*="_txt_Jquery_Approved"]').val("jquery_approved");
}
else {
$('[id*="_txt_Jquery_Approved"]').val("jquery_declined");
}
}
|
|
|
|
|
Thanks jkirkerx. I have no idea about J quey. But this gives me some idea as to what this code intends to do. I will do some research on what you suggested. Probably could incorporate in my project.
Appreciate it.
|
|
|
|
|
All the asp.net validation controls do is load some javascript or microsoft jscript, and run the regex that you assign to it against the textbox value. Then they display some text via javascript, with the text message you assign to it.
Computer users are not that smart, although they think there smart, and the UI (user interface) will become your biggest challenge. Writing a page application is half the battle, the easiest part. The hardest part is validating the form before submission.
If you can't convey the errors to let's say your mom, then the program is partially useless.
|
|
|
|
|
i get error in IE 8 for the code bellow (but it work in IE9)
<script type='text/javascript'>alert('Saved Successfully !')</script><script language='JavaScript'> window.location('../../Personal/View/Default.aspx');</script>
<script type="text/javascript">
the error is :
Message: Object doesn't support this action<br />
Line: 236<br />
Char: 2<br />
Code: 0<br />
URI: http://192.168.0.110:8080/crm/WorkFlows/Forms/WorkReport/default.aspx?md=new&operation=4<br />
thanks in advanced!
modified 14-Aug-12 0:35am.
|
|
|
|
|
Hi,I have Done That!
string url = "../../Personal/View/Default.aspx";
string jScriptValidator = "<script>";
jScriptValidator += "window.open('" + url + "','_self')";
jScriptValidator += " </script>";
page.ClientScript.RegisterStartupScript(typeof(Page), "regJSval", jScriptValidator);
|
|
|
|
|
Error executing child request for new_Page.aspx.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Error executing child request for new_Page.aspx.
Source Error:
Line 14: Server.Transfer("new_Page.aspx");
Above is the error found. It works fine in local host but not when I trying to run in on virtual directory.
When I deleted the Export Excel Function in my page, the error gone.
Microsoft.Office.Interop.Excel.Application xlApp =
new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook xlWorkbook = xlApp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet);
Microsoft.Office.Interop.Excel.Sheets xlSheets = null;
Excel.Worksheet xlWorksheet = null;
Anyone know how to fix this?
|
|
|
|
|
Not sure, are you getting this error: "Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack." ?
|
|
|
|
|
No.
I think it might because of the server doesn't have excel library??
I have no idea how to fix this.
|
|
|
|
|
Member 9169887 wrote: I think it might because of the server doesn't have excel library??
Correct.
Member 9169887 wrote: I have no idea how to fix this.
Install the Excel-interop libraries.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
can you deploy Excel ddl to application path or install Excel InteropServices
-Vijay
|
|
|
|
|
Yes, I can.
I guess the question should rather be "how do I". Answer is on MSDN[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have the following table:
<asp:Table runat="server">
<asp:TableRow ID="headerROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="contentROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="footerROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
I want to know how can bring the footerRow to the absolute bottom of the page when the contentROW is less than the page height?
|
|
|
|