|
When I run the statement in query analyzer, it does work. And how to read up on SQL injection attacks
Chaitra N
|
|
|
|
|
Any Body can explain me the Web Farm Concepts and with examples.
Thanks in Adance.
VEERU
|
|
|
|
|
A web farm means lots of servers working together. I'm not sure how you hope for examples, it's a hardware concept. Obviously, code needs to be written so it supports it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
In Grid view header i putted one checkbox and inside gridview also having checkbox and one button outside the grid.
when i click button it's give me dgridview header checkbox check or not.
but it's giving me null.
this code giving me null.
CheckBox chkAllDelete = (CheckBox)GridView1.HeaderRow.FindControl("chkAll");
when i m trying to find this control.i m getting null value.
my code:
This code in Html part
<asp:templatefield>
<headertemplate>
<itemtemplate>
<asp:checkbox id="chkSelect" runat="server">
var counter = 0;
var pattern = '^GridView1';
// Get the checkboxes inside the Gridview which is part of the template column
function GetChildCheckBoxCount()
{
var checkBoxCount = 0;
var elements = document.getElementsByTagName("INPUT");
for(i=0; i<elements.length;i++)
{
if(IsCheckBox(elements[i]) && IsMatch(elements[i].id)) checkBoxCount++;
}
return parseInt(checkBoxCount);
}
// A function that checks if the checkboxes are the one inside the GridView
function IsMatch(id)
{
var regularExpresssion = new RegExp(pattern);
if(id.match(regularExpresssion)) return true;
else return false;
}
function IsCheckBox(chk)
{
if(chk.type == 'checkbox') return true;
else return false;
}
function AttachListener()
{
var elements = document.getElementsByTagName("INPUT");
for(i=0; i< elements.length; i++)
{
if( IsCheckBox(elements[i]) && IsMatch(elements[i].id))
{
AddEvent(elements[i],'click',CheckChild);
}
}
}
function CheckChild(e)
{
var evt = e || window.event;
var obj = evt.target || evt.srcElement
if(obj.checked)
{
if(counter < GetChildCheckBoxCount())
{ counter++; }
}
else
{
if(counter > 0) { counter--; }
}
if(counter == GetChildCheckBoxCount())
{ document.getElementById("chkAll").checked = true; }
else if(counter < GetChildCheckBoxCount()) { document.getElementById("chkAll").checked = false; }
}
function AddEvent(obj, evType, fn)
{
if (obj.addEventListener)
{
obj.addEventListener(evType, fn, true);
return true;
}
else if (obj.attachEvent)
{
var r = obj.attachEvent("on"+evType, fn);
return r;
}
else
{
return false;
}
}
function Check(parentChk)
{
var elements = document.getElementsByTagName("INPUT");
for(i=0; i<elements.length;i++)
{
if(parentChk.checked == true)
{
if( IsCheckBox(elements[i]) && IsMatch(elements[i].id))
{
elements[i].checked = true;
}
}
else
{
elements[i].checked = false;
// reset the counter
counter = 0;
}
}
if(parentChk.checked == true)
{
counter = GetChildCheckBoxCount();
}
}
|
|
|
|
|
Since you are using asp.net why are you using input html controls for your checkboxes instead of asp.net checkbox server control?
Ben
|
|
|
|
|
What if any impact does folder structuring of a website have on SEO? Also the naming of the files. Is it better to have the pages as close to the root as possible or to have all the files named index.aspx and in a folder structure for example...
english -- uk -- advertisements -- index.aspx
english -- usa -- advertisements -- index.aspx
and
french -- uk -- advertisements -- index.aspx
french -- usa -- advertisements -- index.aspx
Does this type of structure actually help with SEO?
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi,
The structure doesnt matter so much the key elements are:
1) Naming files as appropriately as possible. However overkill is actually a negative things.
2) Dont nest your files so much that they are excessively stacked. If you have files nested more that say 3 folders deep you may piss the search engine spiders off and the files wont get indexed.
3) Its more important to optimise your page content and meta tags than anything else.
munklefish
|
|
|
|
|
Hi All
I m using asp.net with vb.net. There s a DataGrid Control on my page, There is a column Customer Name who's Text is set as below.
in aspx page
<asp:Label ID="custnamelbl" runat="server" Text='<%# setcustomername(container.dataitem("order_id")) %>' ></asp:Label>
Look at its Text property how it is set.
And the code of setcustomername sub is as follow.
Function setcustomername(ByVal orderid As Integer) As String
SelectQuery = "SELECT customers.customer_id,customers.customer_type, customers.fname, customers.lname FROM customers INNER JOIN cust_order ON customers.customer_id=cust_order.customer_id WHERE cust_order.order_id=" & orderid & ""
selectcommand = New OleDbCommand(SelectQuery, Conn)
total = selectcommand.ExecuteReader()
While total.Read()
If Not total.IsDBNull(0) Then
cuid = total.getvalue(0)
End If
If Not total.IsDBNull(1) Then
cusType = total.getvalue(1)
End If
If Not total.IsDBNull(2) Then
first = total.getvalue(2)
End If
If Not total.IsDBNull(3) Then
last = total.getvalue(3)
End If
End While
If cusType = 1 Then
camp_name = ""
SelectQuery = "SELECT comp_name FROM biz_cust_extra WHERE customer_id=" & cuid & ";"
selectcommand = New OleDbCommand(SelectQuery, Conn)
total = selectcommand.ExecuteReader()
While total.Read()
If Not total.IsDBNull(0) Then
camp_name = total.getvalue(0)
Else
camp_name = ""
End If
End While
Return camp_name
Else
Return first & " " & last
End If
End Function
U can see that if customer is business customer then its company name will b displayed, if it is end user then its name will b displayed. Now the column will have either name or company name. I want to Sort this column when some one click on its header.
Can any one tell me how to do that. Its realy very urgent. Pls Help me.
thanks in Advance.
|
|
|
|
|
The gridview has built in support for sorting. Otherwise, you need to render headers that are clickable, and that change the SQL that's executed, so it sorts by the correct fields.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, I would like to place a transparent background image over some a few
drawing lines, like gif or png in crystal report? Please advise.
|
|
|
|
|
I am trying to open a file on my local server which resides in the root directory where all my .aspx files are, BUT VS2005 seems to keep wanting to open it from this location:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\
Ie. I'd like to open files in the root directory regardless whether its on my local machine or online...?
Could anyone lend us a hand with this one please?
Help much appreciated,
Gerry
asp.net newbie
|
|
|
|
|
Open it in the IDE, or within your app ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi Christian,
Attempting to open it programmatically:
<br />
String path = this.ResolveClientUrl("adsense_bottomArticle.txt");<br />
Gerry
|
|
|
|
|
How to format the text in the label or textbox like we want to keep some text bold in the paragraph shown in the textbox or label
Thnx in Advance
Manoj Bisht
|
|
|
|
|
By using the correct HTML tags ( strong for bold, for example )
A textbox isn't going to let you do this, but a label is.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hey guys
i made pie radchart i wonna set the series data programitecly and i wonna put
RadChart1.Series.Item(0).Item(0).Name = "In "
its work but i wonna define string and write sql query
like select column_name from table_name where column_name= 0 and put it in
RadChart1.Series.Item(0).Item(0).Name = "In"+ string
Public Sub RadChart1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadChart1.Load
Dim sqls As String = "select EmailRecieved, count(EmailRecieved) from Emails where CallType = 0 Group by (EmailRecieved)"
Dim cmd As New SqlCommand
cmd.CommandText = sqls
Dim strcon As New SqlConnection(Conn)
Dim EmailsAdapter As New SqlDataAdapter
EmailsAdapter.SelectCommand = cmd
cmd.Connection = strcon
strcon.Open()
' EmailsAdapter.SelectCommand = New SqlCommand("Select * from RecCalls", MyConn)
RadChart1.Series.Item(0).Item(0).Name = "In " + sqls
Try
'Dim CallDS As New ds1
'CallsAdapter.Fill(CallDS)
RadChart1.DataBind()
Finally
strcon.Close()
End Try
End Sub
the sqls still empty
Developer
|
|
|
|
|
Why does no-one use proper variable names ?
none of this code seems to actually execute the comment ( that I can see, apart from lines you have commented out ). Does the SQL you're using return anything ? If so, then you really need to read the docs on the control that you're using, and look for the support forums on their site for help in using them.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Everyone,
I want to run the flash file through server-side code not through html code like <object>.........
Thnx in Advance
|
|
|
|
|
You can't - server code runs on the server, all it can do, is form the HTML that allows it to run on the client.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Try to import com componant for importing flash movie.
God Bless you.
Always do good to others
|
|
|
|
|
Hi all,
I have a case where i need to activate or deactivate validators if a certain field is visible or not. Note that iam making these fields visible or invisible using a javascript. Any ideas? Thanks
|
|
|
|
|
You can copy the code that ASP.NET generates and control if validators are fired, or how they are fired.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Can u give me more details!!!!
What i need is Ability to hide a certain container with all the validators inside it (disable them not just hide them)
|
|
|
|
|
I don't recall the actual functin names, but they are widely documented via google. One starting point is to look at hte code that is generated if you create a control with a validator.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I was a windows application programmer. I am newbie in web.
What i did in windows application is that the database connection will implemented at the time of start up the program. But when i started the work on web application i got an advice to open and close the database connection for every database operation. As an explanation they said it is the safest method.
But what is the risk? I searched some time in Google i couldn't find a good answer. Can i store sqlconnection object in application variables? Or is there any other good method? Can i get any useful links for this?
Thanks and regards
Ken,Mexico(Guanajuato)
|
|
|
|