|
Hi,
I have a notification checkbox and an email textbox. I have to validate email checkbox so that it should not be empty and has a valid email then only notfication checkbox should be enabled or it should throw an error message to fill email to make this checkbox selectable etc.
Can anybody please help me in resolving this, any help or any kind of link would be very helpfull.
Thanks,
Abdul
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Here[^] you are
Bastard Programmer from Hell
|
|
|
|
|
Hi,I have a asp menu which have dynamic genrated first and second level nodes in it. now if i click on first level node then it shows the 2nd level node. then i select my second level node.. so then how can i acess selectedvalue for 2nd level nodes.?? any solution??
i treid menuitem_click() event but it gives me only firstlevel node selected value..
|
|
|
|
|
Hi,
Anyone knows about a payment gateway for the Middle East region (Bahrain) which will work with ASP.NET and allow to have customized payment form?
Thanks,
Jassim
|
|
|
|
|
Hi,
Is it possible to use the Paypal standared account in ASP but with a customized payment form using ASP.NET itself or some third party integrator so user won't see any form except my payment form?
Thanks,
Jassim
|
|
|
|
|
I think you have to use Paypal Pro NVP (named value pair) or XML. The Basic Paypal is CIM, and requires you to preload a remote form, and get the values back when redirecting back to your website.
NVP is just named value pairs AIM eg. FirstName=Joe, CC_Number=9999 9999 9999 9999,
and is pretty simple to write code for, then you just transmit your NVD to paypal and parse the response back, using your form and code.
|
|
|
|
|
I am from Middle East but the Pro is available for US only? am I right?
|
|
|
|
|
Well since paypal deposits money into a pay pal account, and not your middle east checking account, then I don't see why you can't use it in the middle east, unless it's an issue with your countries currency, such as the rial for example.
Pro is $30 USD a month, plus fee's.
When it comes to code, there all pretty much the same. You package, transmit, receive and parse, then store the results. The hard part is creating the user interface in a manner that is easy to use.
Call em, or post a message in the paypal forum.
|
|
|
|
|
but it is not available for international users?
|
|
|
|
|
I have a gridview created on a page where I want to provide an edit button for the user to click in. However the issue is the grid view row becomes editable only while clicking the edit button second time. Not sure what is going wrong here, any help would be appreciated.
One additional point is my grid view is displayed on the page only on a click of a button and is not there on page_load event hence.
Posting the code snippets:
//MY Aspx code
<asp:GridView ID="GridView1" AllowPaging="True" BackColor="#f1f1f1" AutoGenerateColumns="false"
Style="z-index: 101; left: 30px; position: absolute; top: 300px"
Font-Size="Large" Font-Names="Verdana" runat="server" GridLines="None" OnRowEditing = "GridView1_RowEditing" OnRowCancelingEdit = "GridView1_CancelingEdit" OnRowUpdating = "GridView1_RowUpdating"
BorderStyle="Outset" OnRowUpdated = "GridView1_RowUpdated" AllowSorting="false">
<RowStyle BackColor="Gainsboro" />
<AlternatingRowStyle BackColor="White" />
<HeaderStyle BackColor="#0083C1" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="Slice" SortExpression="name">
<ItemTemplate>
<asp:Label ID="lblslice" Text='<%# Eval("slice") %>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblslice" Text='<%# Eval("slice") %>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Metric" SortExpression="Description">
<ItemTemplate>
<asp:Label ID="lblmetric" Text='<%# Eval("metric")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblmetric" Text='<%# Eval("metric")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Original" SortExpression="Type">
<ItemTemplate>
<asp:Label ID="lbloriginal" Text='<%# Eval("Original")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lbloriginal" Text='<%# Eval("Original")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="WOW" SortExpression="Market">
<ItemTemplate>
<asp:Label ID="lblwow" Text='<%# Eval("WOW")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblwow" Text='<%# Eval("WOW")%>' runat="server"></asp:Label>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Change" SortExpression="Market" >
<ItemTemplate>
<asp:Label ID="lblChange" Text='<%# Eval("Change")%>' runat="server"></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtCustomerID" Text='<%# Eval("Change") %> ' runat="server"></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField HeaderText="Edit" ShowEditButton="True" />
</Columns>
</asp:GridView>
My code behind:
protected void Page_Load(object sender, EventArgs e)
{
}
public void populagridview1(string slice,string fromdate,string todate,string year)
{
SqlCommand cmd;
SqlDataAdapter da;
DataSet ds;
cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "usp_geteventchanges";
cmd.Connection = conn;
conn.Open();
SqlParameter param1 = new SqlParameter("@slice", slice);
cmd.Parameters.Add(param1);
SqlParameter param2 = new SqlParameter("@fromdate", fromdate);
cmd.Parameters.Add(param2);
SqlParameter param3 = new SqlParameter("@todate", todate);
cmd.Parameters.Add(param3);
SqlParameter param4 = new SqlParameter("@year", year);
cmd.Parameters.Add(param4);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds, "Table");
GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();
}
protected void ImpactCalc(object sender, EventArgs e)
{
populagridview1(ddl_slice.SelectedValue, dt_to_integer(Picker1.Text), dt_to_integer(Picker2.Text), Txt_Year.Text);
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
gvEditIndex = e.NewEditIndex;
Gridview1.DataBind();
}
[My page layout]
This edit screen appears after clicking edit twice.. the grid view gets displayed on hitting the Calculate impact button. The data is from a backend stored procedure which is fired on clicking the Calculate impact button
|
|
|
|
|
Below is my code where I am trying to delere row in session based on criteria. However it's not working. Please help
For Each myRow As DataRow In HttpContext.Current.Session("myConfiguration").PlanRates.Rows
If myRow.RowState <> DataRowState.Deleted Then
If myRow.Item("Term") = myDataKey(0).Trim And _
myRow.Item("AgeGroup") = myDataKey(1).Trim And _
myRow.Item("Coord") = myDataKey(2).Trim Then
Dim myDataRow() As DataRow = HttpContext.Current.Session("myConfiguration").PlanRates.Select("Term='" & myDataKey(0).Trim & "' AND Coord='" & myDataKey(2).Trim & "' AND AgeGroup='" & myDataKey(1).Trim & "'")
Exit For
End If
End If
Next
modified 3-Apr-12 8:13am.
|
|
|
|
|
Use appropriate spacing and format your code snippets like every other question posted here. This is unreadable garbage.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I am new to jquery, I have following validation methods on my form. But if once I place an update panel of ajax on top of the main parent div tag in my form, these validation methods are not executing properly. I dont know the reason because I am new to the jquery.
Please help me either by giving some solution to this problem or help me how should I call these methods from my endrequest method of jquery.
Here is the jquery code
<script type="text/javascript" src="../Script/Payment.js"></script>
<script type="text/javascript" src="../Scripts/jquery.validate.creditcard2.js"></script>
<script type="text/javascript">
var lastNameValid = false;
var confirmationValid = false;
$(document).ready(function(){
$(function ($) {
$("#phonenumber").MaskPhoneNumber();
});
$(function ($) {
$("#telephone").MaskPhoneNumber();
});
$(function ($) {
$("#postcode").ForceNumericOnly();
});
$(function ($) {
$("#cardnum").ForceNumericOnly();
});
$(function ($) {
$("#ccMonth").ForceNumericOnly();
});
$(function ($) {
$("#ccYear").ForceNumericOnly();
});
$(function ($) {
$("#securityCode").ForceNumericOnly();
});
$('.validationGroup .causesValidation').click(function (evt) {
var $group = $(this).parents('.validationGroup');
var isValid = true;
$group.find(':input').each(function (i, item) {
if($(item)[0].id != "")
{
if (!$(item).valid())
{
isValid = false;
}
}
});
if (!isValid)
evt.preventDefault();
});
$("#MainForm").validate({
rules: {
<%= firstname.UniqueID %>: {
required: true,
minlength: 1
},
<%= lastname.UniqueID %>: {
required: true,
minlength: 1
},
<%= phonenumber.UniqueID %>: {
required: true,
minlength: 12
},
<%= cardholdername.UniqueID %>: {
required: true,
minlength: 1
},
<%= address1.UniqueID %>: {
required: true,
minlength: 1
},
<%= city.UniqueID %>: {
required: true,
minlength: 1
},
<%= postcode.UniqueID %>: {
required: true,
minlength: 5,
number: true
},
<%= telephone.UniqueID %>: {
required: true,
minlength: 12
},
<%= ccMonth.UniqueID %>: {
required: true,
minlength: 2,
number: true
},
<%= ccYear.UniqueID %>: {
required: true,
minlength: 4,
number: true
},
<%= securityCode.UniqueID %>: {
required: true,
minlength: 3,
number: true
},
<%= rblPaymentType.UniqueID %>: {
required: true
},
<%= cardnum.UniqueID %>: {
required: true,
number: true
}
},
messages: {
<%= firstname.UniqueID %>: {
required: "Please provide your First Name",
minlength: "Your First Name must be at least 1 character"
},
<%= lastname.UniqueID %>: {
required: "Please provide your Last Name",
minlength: "Your Last Name must be at least 1 character"
},
<%= phonenumber.UniqueID %>: {
required: "Please provide your Phone Number",
minlength: "Your Phone Number must be at least 10 digits long"
},
<%= cardholdername.UniqueID %>: {
required: "Please provide your Cardholder Name",
minlength: "Your Cardholder Name must be at least 1 characters long"
},
<%= address1.UniqueID %>: {
required: "Please provide your Address1",
minlength: "Your Address1 must be at least 1 characters long"
},
<%= city.UniqueID %>: {
required: "Please provide your City",
minlength: "Your City Number be at least 1 characters long"
},
<%= postcode.UniqueID %>: {
required: "Please provide your Postal Code",
minlength: "Your Postal Code must be at least 5 digits long",
number: "Provide only digits for the postal code"
},
<%= telephone.UniqueID %>: {
required: "Please provide your Telephone Number",
minlength: "Your Telephone number must be at least 10 digits long"
},
<%= rblPaymentType.UniqueID %>: {
required: "Please select Credit Card Type"
},
<%= ccMonth.UniqueID %>: {
required: "Please confirm your Credit Card Month",
minlength: "Your Credit Card Month must be at least 2 digits long",
number: "Provide only digits for the month"
},
<%= ccYear.UniqueID %>: {
required: "Please confirm your Credit Card Year",
minlength: "Your Credit Card Year must be at least 4 digits long",
number: "Provide only digits for the year"
},
<%= securityCode.UniqueID %>: {
required: "Please confirm your Security Code",
minlength: "Your Security Code must be at least 3 digits long",
number: "Provide only digits for the security code"
},
<%= cardnum.UniqueID %>: {
required: "Please enter your Credit Card number",
number: "Provide only digits for the credit card number"
}
},
errorElement: "li",
errorLabelContainer: "#errorMessage",
onsubmit: false
});
$("#firstname").blur(function () {
var elemTest = $("#firstname").valid();
});
$("#lastname").blur(function () {
var elemTest = $("#lastname").valid();
});
$("#phonenumber").blur(function () {
var elemTest = $("#phonenumber").valid();
});
$("#cardholdername").blur(function () {
var elemTest = $("#cardholdername").valid();
});
$("#address1").blur(function () {
var elemTest = $("#address1").valid();
});
$("#city").blur(function () {
var elemTest = $("#city").valid();
});
$("#state").blur(function () {
var elemTest = $("#state").valid();
});
$("#postcode").blur(function () {
var elemTest = $("#postcode").valid();
});
$("#telephone").blur(function () {
var elemTest = $("#telephone").valid();
});
$("#ccMonth").blur(function () {
var elemTest = $("#ccMonth").valid();
});
$("#ccYear").blur(function () {
var elemTest = $("#ccYear").valid();
});
$("#securityCode").blur(function () {
var elemTest = $("#securityCode").valid();
});
$("#rblPaymentType").blur(function () {
var elemTest = $("#rblPaymentType").valid();
});
$("#cardnum").blur(function () {
var elemTest = $("#cardnum").valid();
});
$("#txtemailaddress").blur(function () {
var elemTest = $("#txtemailaddress").valid();
});
$("#cardnum").rules("add", {
creditcard2:
function () {
return $("#rblPaymentType input[type=radio]:checked").val();
}
});
});
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);
function EndRequest(sender, args) {
$(function () {
$('#btnFinalize').bind({click: validate});
});
</script>
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Its very difficult to follow such as huge block of code. You should consider better good and break this up into multiply functions to make it easier read and maintain.
The document.ready function will not be executed after the update panel refresh because the page is not being reloaded. You need to call the method in the end request also, which is another reason the break it up into smaller functions
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi,
I am new to the jquery, I am struggling to split that in to small functions. And call that in endrequest method. I am trying to google but its not helping me much.
Can you please help me for the above scenario, how can I split that in to functions and call it in two methods document.ready and endrequest.
Or any link is also would be very much helpfull.
Thanks,
Abdul
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Writing functions has nothing to do with JQuery. If have to Google, and not find any help, how to write small functions and call them from another function you are in the wrong field and there is no help that can be given.
Failure is not an option; it's the default selection.
|
|
|
|
|
Hi Mark,
Sorry may be I put the sentense in wrong way. I have split them in to small fucntions. Now I got another problem.
I am calling EndRequest method. In that method I am calling all the methods that I have created for validation. I have put debug point also. It is hitting the point. Means all the validations are loading, but still the messages are not being displayed. It is happening only when I make selection change in the ajax comboboxes that I have put within update panel.
When I click the finalize button, its not going in to the code behind which is expected behavior but the ajax validation messages are not being displayed.
Any sort of help pls.
Thanks,
Abdul.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
There's a line of code you have to insert in order to execute jquery on a webform with an update panel. It's been awhile since I've any Jquery, so I might be off a bit on the sample, which is hand typed.
You should Google the Topic, there is a page out there with a more detailed description, took me a couple of days to figure it out.
$(document).ready(function () {
intialiateBinding();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
}
function EndRequestHandler(sender, args) {
initiateBinding();
}
function initiateBinding() {
$document).ajaxStart(function () {
});
$(document).ajaxStop(function () {
});
$('id*="_txt_CreateAccount_Name"]').blur(function () {
var txtBlur;
var txtError;
});
}
|
|
|
|
|
Your current problems date back to this post.
Technically, Advanced JQuery does not require the use of an update panel. With advanced jquery, you just make small ajax json calls to a web service, that duplicates the behavior of the update panel.
[LESSON]
The update panel has nothing to do with the AjaxControlToolkit. It is a member of System.Web.Extensions. It's purpose is to make small partial postbacks to the server, of the contents of it's container.
To use the update panel correctly, you should create the update panel, and wrap the contents of the panel inside div tags, the update panel is the content container.
[ JQUERY inside a update panel ]
Your JQuery Code that you posted is not correct.
First you have to wait for the DOM
Now get the instance of the PageRequestManager, and assign a EndRequestHandler
Now you bind your functions to the EndRequestHandler
Then List your functions after that.
They will fire correctly now.
$(document).ready(function () {
initiateBinding();
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
});
function EndRequestHandler(sender, args) {
initiateBinding();
}
function initiateBinding() {
$(document).ajaxStart(function () {
$.blockUI({ css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
}
});
});
$(document).ajaxStop(function () {
$.unblockUI();
});
$('[id*="_ddl_SP_MakeSelection_Field"]').change(function () {
var creditCard_Selected;
creditCard_Selected = $('[id*="_ddl_SP_MakeSelection_Field"]').val();
$('[id*="_txt_Preview_SecureCardID"]').val(creditCard_Selected);
});
}
function collapse_CreditCard_Details(controlObj, panelObj) {
$(document).ready(function () {
$.blockUI({ css: {
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
}
});
setTimeout($.unblockUI, 3000);
intialize_Fields();
$('[id*="_panel_Enter_CreditCard_Master_Container"]').animate({ height: "0px", opacity: 1 }, 1200).hide();
}
function AjaxSucceeded(result) {
alert(result.d);
}
function AjaxFailed(result) {
alert(result.status + " " + result.statusText);
}
FYI
I don't use update panels anymore. After years of writing and testing, overall in the very end of collecting knowledge for them, plus looking far into the future, they have too many limitations in the end, and are not smooth and silky in operation, and will never be. They are clunky, and customers don't like them. They create mistakes in judgement by the user, in which they will keep clicking until something happens, producing double records.
|
|
|
|
|
Hi,
I've created a WCF Service in C#, everything is fine while I am working in localhost(hosted in ASP.NET DEVELOPMENT Server).
I'm trying to host my Service in IIS 7.5, but i get this error message while i tried to open Service.svc file: [IMG]http://i43.tinypic.com/xbgruo.png[/IMG]
I also changed users privileges, to access to the files, but still nothing changes.
Do I need to change/add something in web.config file or the problem is still in configuring IIS?
Thank you!
|
|
|
|
|
what is gridview??
|
|
|
|
|
See Here[^],
Here[^],
And
Here[^]
Basically it is a presentation of data that allows for manipulation and interaction.
---------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
English League Tables - Live
|
|
|
|
|
|
The GridView control is a feature rich and versatile control used to accept, display, and edit data on a web page. It is a commonly used control in ASP.Net web applications.
To use a GridView control a DataSource control has to be attached to the GridView control. The property DataSourceID of the GridView control binds the GridView control to the DataSource control and allows paging, sorting and database operations with the DataSource.
Refer this:
http://www.codeproject.com/Articles/14293/Gridview-Inside-a-GridView-in-ASP-NET-2-0
- Happy Coding -
Vishal Vashishta
|
|
|
|
|
Code to Read text from Any Image
|
|
|
|
|