|
deepthy.p.m wrote: know this answer pls give the code also.
What have you tried? Post some code so we can help you
|
|
|
|
|
Hi,
As iam getting an error called "InvalidOperationException was unhandled by the usercode","Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition"....Can anybody help me regrding this.
Regards,
Sami.
|
|
|
|
|
You have already written the answer
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
Remove one of the definitions...
|
|
|
|
|
My question is based on Intranet application.
There is a machine by the name of machine1 where i hosted the intranet application.
Now from machine2 which is attached with machine1 intranet application(virtual directory), i am trying to access the intranet application aspx page.This is working very fine.Even there is no shared folder on machine1.Simply , the windows firewall is off.
But when i try to access those pages programatically , it says Access not denied.
Please help
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Any password protections ?
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
It is an anonymous access
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Do you not need a username and password to go in programtically??
|
|
|
|
|
there is an operating System authentication.
I think , i need to provide the user name and password.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
You need to provide the authentication on the domain where this Intranet is located...
Try providing the username and password for this domain adn see if it helps.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
HI
i need to know a way to implement search on my web site that would search the content of my web site and provide the result from my web site, is there any way of doing it with any api for example with google API's or any other in ASP.NET , kindly reply ASAP, thanks in adavance.
|
|
|
|
|
There is no search API built into aSP.NET ( how could there be ? ). If your site is live on the web, you could just build a google query that searches your site. If it's not, then you need to index your site and search it, almost certainly from a SQL database.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
You could also try Microsoft Index Services
http://www.developerfusion.co.uk/show/7141/
http://aspnet.4guysfromrolla.com/articles/033005-1.aspx
|
|
|
|
|
get it Search Engine [^]
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi
Throughout my application I have used stored procedures however on a few occasions I have wrritten the sql query into the c# as a string.
Is it a risk to have any sql queries written directly into the c# or is it only certain circumstances where it is a risk?
thanks
|
|
|
|
|
This question has nothing to do with ASP.NET.
Try typing SQL Injection into the search box for this site, and you'll find an excellent article explaining what SQL injection is ( I am assuming you do not know ) and how to avoid it. This should help you work out if your queries could be affected by it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: This question has nothing to do with ASP.NET.
I wouldnt say it has nothing to do with asp.net
I have written the applicaion in asp.net and used c# as the backend code.
The context of the question relates back to an asp.net application
But thanks for the article advice
|
|
|
|
|
OK, I have read the article but I would like to clarify my question
If I had the following:
string sql = "Select * from table"
If the above code was on a page_load event and was not linked to a textbox i.e. was not selecting a value from the database which matched the value in the textbox then surely this would not be vulnerable?
An attacker would not be able to manipultate this query as it is not linked to an input control, am I right?
thanks
|
|
|
|
|
Yes. In this case attacker won't be able to do injection. It usually happens when the query is formed by string concatenations.
|
|
|
|
|
|
I am using asp.net + c#.In my form i am using gridview in that i add one dropdownlist and textbox.dropdownlist filled values from database.when i change the selected index of the dropdown list i want to display corresponding datavalue in textbox.
How can i do it.I cant get the row index o the gridview when i select the dropdownlist selectedindex changed event.If anyone know this pls give the code.
|
|
|
|
|
You can use the find control to find the dropdownlist in the gridview
|
|
|
|
|
You can also do it using javascript.
Look at this example code.
HTML Source code
<asp:DropDownList ID="ddl" runat="server" onclick="GetValue(this);">
<asp:ListItem Value="1" Text="One"></asp:ListItem>
<asp:ListItem Value="2" Text="Two"></asp:ListItem>
<asp:ListItem Value="3" Text="Three"></asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="ddltext" runat="server"></asp:TextBox>
Javascript Code
function GetValue(ddlObj)
{
document.getElementById(ddlObj.id + 'text').value=ddlObj.options[ddlObj.selectedIndex].value;
}
please don't forget to vote on the post that helped you.
|
|
|
|
|
The only problem with javascript is that users can disable it in their browser.
|
|
|
|
|
i think u cant understand my problem.I filled dropdownlist with database values.and set datatextfield to "id" and datavalue field to "Name".When i change the index of the dropdownlist i want to fill the text box with corresponding datavalue field of the dropdown list.These dropdown and text box are in grid view.I use that code but u call javascript in onclick event so it display '1' .I think u understand my problem.pls replay to me
|
|
|
|