|
Please don't.
Many many people post similar - the usual is "how can I disable the right-click menu". The problem is, all it achieves is narking off your user - changing expected functionality is never a good idea.
Also, without sounding rude, a very wise man once said "what makes you think that anyone is going to be interested in your content that much anyway"
Additionally, even if you do manage to disable it, there are a ridiculous number of methods to still get access to what you've done!
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
Hi! in my application i have to insert mor than one records in the database. for this i prepare a dataset containing all the records in a table. now i want to insert all these records preserving ACID property. how can i do this?
Thanks & Regards,
SAMir Nigam,
Software Engineer,
STPL, Lucknow, India.
|
|
|
|
|
Hi,
i have a problem regarding database,
I have a db and fetched the data from db through dataset, and at same time another user fetches the same data and updates the db.
Now i confirmed the changes through dataset.haschanges() method and now i want to update the database with my changes
how can i get this functionality, both users working on same data
Can someone clarify me how can i proceed
Thanks
Mukkanti
|
|
|
|
|
I want to seach the data based on the value entered in the text boxes and dropdown list.
I have written the folling code. but getting error "Incorrect syntax near the keyword 'and' while running. What can i do for this?
Sub bindresult(ByVal sqlstr As String)
Dim ds As New DataSet()
Dim comm As New SqlDataAdapter(sqlstr, dbconn)
dgresult.DataSource = ds
comm.Fill(ds)
dgresult.DataBind()
navi.Visible = True
lblnopg.Text = dgresult.PageCount
End Sub
Protected Sub Btnsearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Btnsearch.Click
If Txtascd.Text.Trim = "'" Then
Txtascd.Text = ""
Exit Sub
End If
If txtip.Text.Trim = "'" Then
Txtascd.Text = ""
Exit Sub
End If
If txtmobile.Text.Trim = "'" Then
Txtascd.Text = ""
Exit Sub
End If
dgresult.CurrentPageIndex = 0
ViewState.Remove("vstr")
If Txtascd.Text.Trim <> "" Then
vstr = " and assetcode='" & Txtascd.Text.Trim & "'"
ViewState("vstr") = vstr
End If
If Ddmodel.SelectedIndex <> 0 Then
vstr = " and model='" & Ddmodel.SelectedItem.Text & "'"
ViewState("vstr") += vstr
End If
If txtmobile.Text.Trim <> "" Then
vstr = " and mobile='" & txtmobile.Text.Trim & "'"
ViewState("vstr") = vstr
End If
If txtip.Text.Trim <> "" Then
vstr = " and ip='" & txtip.Text.Trim & "'"
ViewState("vstr") = vstr
End If
vstr = ViewState("vstr")
sqlstr = "select 'LNO'=assetcode,'SerialNo'=serialno,'Model'=model,'Mobile'=mobile, 'IP'=ip from A_laptops " + vstr + " order by lno asc"
ViewState("sqlstr") = sqlstr
bindresult(sqlstr)
End Sub
|
|
|
|
|
Hi,
There is no "where" clause in your query and if I am understading your code correctly your sqlstr would be as following.
Let say your first and last condintions are true and you have "abc" in Textascd.Text and "123" in txtip.text so your vstr would be
vstr = " and assetcode='abc' and ip='123'"
now id u put this in your sqlstr expression your final sqlstr would be
select 'LNO'=assetcode,'SerialNo'=serialno,'Model'=model,'Mobile'=mobile, 'IP'=ip from A_laptops and assetcode='abc' and ip='123' order by lno asc
here you dont have "where" in your query and even if u have then also after where you can not have "and". Thats why its giving error.
Put some logic to remove first "and" from the final query.
I hope this will help you.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi Chetan,
I had tried by giving where,
sqlstr = "select 'LNO'=assetcode, 'SerialNo'=serialno, 'Model'=model, username, 'Mobile'=mobile from A_laptops where assetcode='" & Txtascd.Text.Trim & "' or mobile='" & txtmobile.Text.Trim & "' or model='" & a & "'or firstname='" & txtfname.Text.Trim & "' or lastname='" & Txtlname.Text.Trim & "'" + vstr + " order by lno asc"
When i enter some data in text box or select from drop down list, it works. But when all control are empty and if click search, it i want it to display all the rows present in the table,
if is give,
sqlstr = "select * from A_laptops" + vstr + " order by assetcode asc"
then, selected rows will not get displayed.
Do I have any alternative for this?
|
|
|
|
|
Hi, I got it thank you.
I just took the two aliases for the same table and compared their primary keys. Now it is working fine. Thank you.
sqlstr = "select 'LNO'=al.assetcode, 'SerialNo'=al.serialno, 'Model'=al.model, al.username,'Mobile'=al.mobile from A_laptops al, a_laptops ap where al.assetcode=ap.assetcode" + vstr + " order by lno asc"
|
|
|
|
|
Why do people continue to ignore best practices and use dynamic SQL statements with no validation, in a web application no less.
only two letters away from being an asset
|
|
|
|
|
hi guys,
i got an error while i was migrating one of the webproject developed in
1.1 to 2.0. i got error in one dll reference in global.asax.
it says
"The type 'Ims.Tmpc.Global' is ambiguous: it could come from assembly
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
Files\tmpc\0645d1b5\4ea8c73e\App_Code.h0ihzjo3.DLL' or from assembly
'c:\inetpub\wwwroot\tmpc\bin\Tmpc2003.DLL'. Please specify the assembly
explicitly in the type name.
"
i need thesolution for this pbm...its urgent....
if anyone know what is wrong here, please share your knowledge
with me.
thank u
|
|
|
|
|
1. "Urgent" as a subject is not likely to get many replies, we don't care how urgent it is, we're here because we want to help out of the goodness of our hearts....awwwww
2. The problem seems pretty self explanatory to me, have you even looked into it? Theres a problem with one of your assembly references.
|
|
|
|
|
Thks for ur advice......ya i solved the issue.......
thank u
|
|
|
|
|
Most of your posts are marked 'urgent.' Please title your messages appropriately.
______________________
stuff + cats = awesome
|
|
|
|
|
Hi all,
I would like to get the value of a label from the same row after clicking the delete button. I converted the delete button into a template field and tried the following code
Dim a As String = ""
a = CType(GridView1.FindControl("label1"), Label).Text
It gives me an error saying that object reference not found, and use the NEW keyword to declare a new object instance. I tried declaring NEW on string but gives me an error.
What should I do?
Best Regards,
Aaron Neo
|
|
|
|
|
Hi
Where did you put that code ?? If it is RowCommand Event of Gridview, you should set command name for the button.
Try this...
if (e.CommandName == "Insert")
{
Label lbl = (Label) e.FindControl('Label1');
String StrLabel = lbl.Text.ToString();
}
Harini
|
|
|
|
|
Hi,
Thank you so much for your reply. I tried your coding but it can't work. "Label is a type and cannot be used as an expression"
I have converted the button into a template field. I have placed the codings in the button click event:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Best Regards,
Aaron
|
|
|
|
|
Hi,
I am developing an web application in VS2005 in which the current windows user is Authenticated against the Active directory.It is working fine with vs2005 webserver but when I host my application with IIS it shows an error of "Server not found".
How will I overcome to this problem.
Thanks in Advance
Alok Kumar.....
|
|
|
|
|
Hi everyone
i have problem in my webpage.... I am dynamically binding the data to tje checkboxlist. let us say i select only few of them and go to next page for selecting some more.... and when i come to previous page the selected values are cleared to say the have be unchecked.. so hw to overcome this problem...
thanks in advance
Devkranth
|
|
|
|
|
Hi,
Before moving to the next page you should save selected values in session and use that to get values when come back to the previous page.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
hi
'
i like to know how the values are stored in session and how do i retrive it...
regards
devkranth
|
|
|
|
|
Thats your wish...
You can store by any type which is easy to you.
Eg:
You can store the SelectedValue(s) it as a string with delimiter like "2, 15, 20, 25" where comma(,) is the delimiter. You can split it when you want..
|
|
|
|
|
Hello
I want to save large data in database. This data is string and may be contains up to 2 pages.
-> Which field i should choose for it in SqlServer 2005?
-> I want to save line breaks (Enter Key) and retrive the text from database like i saved it before to database, Somebody says i should save it in html format! How can i do it?
Tanx
|
|
|
|
|
In SqlServer 2005 You can use varchar(max), or nvarchar(max) for this purpose.
It is same as varchar or nvarchar, only difference is that it can store large value.
|
|
|
|
|
hello freshonlineMax,
do you want to save HTML page ???
if yes then use BLOB method to save the data and use the image field in SQLserver the size of this field is 16 bit
i think it will helpful for U, if you want to save HTML page
regards,
-koolprasad2003
N-Joy
|
|
|
|
|
Save that in 'Text' format. You can save upto many pages. You can retrieve back the original thing..
|
|
|
|
|
i m new to SOAP .. i ve developed web server ...with the methods..shown below
while i m using vc++ calient to call this method...
for method Addition ,i metting result 0 everytime
for method MyMethod , i m getting "Inside MYMehod"; is shown not str+"Inside MYMehod";
i ve using mssop toolkint 3.0
web services developed in .NET framework
for .NET c# client but not for vc++ client why?????????????
[WebMethod]
public double Additon(double a,double b)
{
return a+b;
}
[WebMethod]
public string MyMethod(string str)
{
return str + "Inside MYMehod";
}
|
|
|
|