|
Your question is not clear, what do you want? Tell us clearly.
|
|
|
|
|
How to bind treeview inside the Gridview using asp.net.
|
|
|
|
|
|
|
|
Hi,
How to increase the speed of my site search like Google search.
|
|
|
|
|
nabinaya wrote: search like Google search.
To do that, you would need to hire tons and tons of engineers to do some performance tuning.
In general try tuning your database queries (especially the ones you are using for loading the page).
|
|
|
|
|
Hi All,
Im looking for a very good website security scanner tool.
I found a lot on the internet and also tried the Acunetix and NetSparker, but i still don't know which is better and why?
I want one of the best tools to check all the possible leaks.
Can someone give me a good hint please?
|
|
|
|
|
Priya Prk wrote: I want one of the best tools to check all the possible leaks.
Most of the virusscanners that I know catch between 95-97%. The total goes up by combining them
..and there's never a guarantee of non-leaks.
Bastard Programmer from Hell
|
|
|
|
|
Hi,all!
I am working on a project to manage information of our faculty from ASP.net in C#.
There are profiles for lecturer,student and department head.When Admin set privileges to do tasks Eg:edit student details, this should be appear only in the lecturer profile as a links to edit those data.
So, I want to create the admin page with ability to do those tasks and I have no idea to do that. Can you please give ideas,links or tutorials.
Thanks.
Regards
Pimzy
|
|
|
|
|
Hi,i have an idea to use profile mangement in ASP.net.But how can i activate links in profile pages from admin page??Please reply me soon.
|
|
|
|
|
Hi,
I am having one text box and two button named APPLY and START, and two custom validator, both i am validating in jquery.
in one custom control i have given controlTovalidate to Textbox...
for another custom control i haven't given any controltoValidate...mainly for validation on click of "Start" button...
As per my knowledge both should be get tiggered..
but in one secnario like when the first custom validator args.isValid is true.. that time.. second Custom validator is not getting triggered...
code of the first custom control
if (!promoCd.match(regEx))
// if promocode is not an integer of length 9 or 10 then return invalid
{
$("#" + ClientId + "_" + "spnPromoNotEnt").hide();
$("#" + ClientId + "_" + "spnPromoNotReg").show();
args.IsValid = false;
validateResult = false;
}
else {
{
args.IsValid = true;
validateResult = true;
$("#" + ClientId + "_" + "spnPromoNotEnt").hide();
$("#" + ClientId + "_" + "spnPromoNotReg").hide();
$("#TopMessagePanel").hide();
} }
when else part of the first custom code execute.. then second custom control not getting triggered
second custom validator code
function ValidatePromoCode(source, args) {
if (Response == null && validateResult == true) {
if ($("#" + clientId + "_txtPromo").val().length > 0) {
args.IsValid = false;
}
}
else if (validateResult != true) {
$("#TopMessagePanel").hide();
}
}
thanks in advance
|
|
|
|
|
dayakar_dn wrote: then second custom control not getting triggered
$("#" + ClientId + "_" + "spnPromoNotReg").hide();
Well first off, it's just a textbox, there's nothing custom about it. As far as triggering goes, it doesn't get triggered, JQuery has to be able to find that textbox in order to alter the visiblity of the textbox. If it can't find it, it won't get altered to hide. Check your spelling, or alter the way you declare the name of the textbox.
args.IsValid
I don't see the code or declaration for if (args.IsValid) == true { so I can't comment on it. If the condition is not met, the code will never execute.
|
|
|
|
|
I developed an enterprise solution but the main problem is the bostback and the refresh and the time for update the data
now search about best solution for asp.net (c#) rich client
the main target to increase the performance and to be real time updating and i think that will not be applicable without use client side script (java sript)
so is there any solution or tools like json or jqurey can support me?
|
|
|
|
|
|
hi - i'm working on an asp.net page that has a DDL and depending on the DDL selection will display a gridview of results. Here's the code I have so far:
Code:
<%@ Page Title="GDNI_SalesmanManager" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="GDNI_SalesmanManager.aspx.cs" Inherits="GDNI_Salesman_Manager.About" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<style type="text/css">
.style1
{
width: 251px;
height: 120px;
}
</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<h2>
Customer:
<asp:DropDownList ID="ddlCustomers" runat="server" Height="17px"
ToolTip="Customers" Width="285px">
</asp:DropDownList>
</h2>
<p>
<asp:GridView ID="gvProductClass" runat="server">
</asp:GridView>
</p>
</asp:Content>
<pre lang="c#">
using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
namespace GDNI_Salesman_Manager
{
public partial class About : System.Web.UI.Page
{
string strConnString = ConfigurationManager.ConnectionStrings["BB_Datawarehouse_DB"].ConnectionString;
string str;
SqlCommand com;
protected void Page_Load(object sender, EventArgs e)
{
ddlCustomers.AutoPostBack = true;
if (!IsPostBack)
Populate_ddlCustomers();
} //in debug mode the code skips to site.master page load event
public void Populate_ddlCustomers()
{
ddlCustomers.Items.Add("Please Select a Customer");
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "exec dbo.sp_GetCustNumAndDSeq";
com = new SqlCommand(str, con);
SqlDataReader reader = com.ExecuteReader();
while (reader.Read())
{
ddlCustomers.Items.Add(reader["Customer"].ToString());
}
reader.Close();
reader.Dispose();
}
protected void ddlCustomers_SelectedIndexChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "exec dbo.sp_GetProductClsCodeAndSalesman '" + ddlCustomers.SelectedItem.Text + "'";
com = new SqlCommand(str, con);
SqlDataReader reader = com.ExecuteReader();
while (reader.Read())
{
gvProductClass.DataSource = reader;
gvProductClass.DataBind();
}
reader.Close();
con.Close();
}
}
}
at the minute i'm struggling to get the code to step into the protected void ddlCustomers_SelectedIndexChanged see above comment
|
|
|
|
|
here's the answer to my question; I didn't have the OnSelectedIndexChanged="ddlCustomers_SelectedIndexChanged" property set in the ASP properties of the drop down list
Code:
<asp:DropDownList ID="ddlCustomers" runat="server"
Height="17px" Width="285px"
ToolTip="Customers"
AppendDataBoundItems="true"
OnSelectedIndexChanged="ddlCustomers_SelectedIndexChanged">
<asp:ListItem >Please Select a Customer</asp:ListItem>
</asp:DropDownList>
|
|
|
|
|
How to change the image of the Imagebutton by clicking on it.
I wanna chanege it 4 times. Means 4 images available.
default is Black image
on 1st click it changed to Blue image
on 2nd click Green Image
on 3rd click Red image
and on 4th click again black image....
Button is used in Gridview..
|
|
|
|
|
Usually at this situation, I keep hidden imagebuttons and make it visible/hide accordingly.
Note: I am not sure if this is the right way to do this.
|
|
|
|
|
yes but it is possible only if we have only two images to toggle.
But here i have 4 images..
|
|
|
|
|
You Can check on each image button click event. Take a look at the algorithm below
if ( button.ImageURL = [Image1URL]) then
button.ImageURL = [Image2URL]
Else if (button.ImageURL == [Image2URL] ) THEN
button.ImageURL = [Image3URL]
ELSE IF (button.ImageURL == [Image3URL] THEN
button.ImageURL = [Image4URL]
ELSE
button.ImageURL = [Image1URL]
END IF
Hope this algorithm help you out..
|
|
|
|
|
I tried as u said and
My code is as below..
Protected Sub ImageButton2_Click1(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
For i As Integer = 0 To GridView1.Rows.Count - 1
Dim imgbutton As ImageButton = DirectCast(GridView1.Rows(i).Cells(2).Controls(0), ImageButton)
If imgbutton.ImageUrl = "~/Image/Red.png" Then
imgbutton.ImageUrl = "~/Image/Green.png"
ElseIf imgbutton.ImageUrl = "~/Image/Green.png" Then
imgbutton.ImageUrl = "~/Image/Blue.png"
ElseIf imgbutton.ImageUrl = "~/Image/Blue.png" Then
imgbutton.ImageUrl = "~/Image/Black.png"
Else
imgbutton.ImageUrl = "~/Image/Red.png"
End If
Next
End Sub
but it gives me an error like..
Specified argument was out of the range of valid values. Parameter name: index
in this code line--> Dim imgbutton As ImageButton = DirectCast(GridView1.Rows(i).Cells(2).Controls(0), ImageButton)
Any solution for that??
|
|
|
|
|
Hi
Specified argument was out of the range of valid values. Parameter name: index
the above error will occur if GridView1.Rows(i).Cells(2).Controls(0)is exceeding its range. check for the columns you have in grid, if suppose if you have only one row with 1 cell then grid you will receive the error as you mentioned.
Try to use Immediate window when you are debugging and check by copying "GridView1.Rows(1).Cells(2).Controls(0)" , if it throws error reduce the row and cell index numbers.
Hope this will help.
thanks
|
|
|
|
|
|
Hey thanks i tried your algo. First it gives me an error. but i solved it and its working well
|
|
|
|