16,015,756 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by akoyoon (Top 32 by date)
akoyoon
1-Aug-11 7:36am
View
can you explain to me the code and how it work
akoyoon
30-Jun-11 18:52pm
View
now i get
System.Data.SqlClient.SqlException: Conversion failed when converting the nvarchar value 'akoyoon' to data type int.
akoyoon
30-Jun-11 18:43pm
View
when i try this i get
'int' does not contain a definition for 'parse'
akoyoon
30-Jun-11 18:19pm
View
now when i make the query like this
string strQuery = "DELETE FROM [USER] WHERE RoomID=" + Session["CURRENTROOM_ID"].ToString() + " AND nick=" + x;
if field nick have a word like theanil i get the error
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 15: int.Parse(strID1);
akoyoon
30-Jun-11 18:10pm
View
ignore my last reply wait i will update you inn minutes
akoyoon
30-Jun-11 18:06pm
View
here is the page after your suggestions and still the same i get error
System.Data.SqlClient.SqlException: Invalid column name 'nick'.
<%@ Page Language="C#" AutoEventWireup="true" %>
<% if (!IsPostBack)
{
if (Request.UrlReferrer == null)
Response.Redirect("/");
Session["EDIT_DS"] = null;
Session["ACTION"] = null;
string strID = Request.QueryString["ugid"];
string strID1 = Request.QueryString["nick"];
string strID2 = Request.QueryString["ip"];
string strID3 = Request.QueryString["LoggedTime"];
int x = new int();
int.Parse(strID1);
System.Data.SqlClient.SqlConnection SQLConnection = new System.Data.SqlClient.SqlConnection();
string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
SQLConnection.ConnectionString = ConnectionString;
if (SQLConnection.State == System.Data.ConnectionState.Closed)
SQLConnection.Open();
System.Data.DataSet ds = new System.Data.DataSet();
string strQuery = "DELETE FROM [USER] WHERE RoomID=" + Session["CURRENTROOM_ID"].ToString() + " AND nick=" + x;
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandText = strQuery;
cmd.Connection = SQLConnection;
cmd.ExecuteNonQuery();
SQLConnection.Close();
Session["ACTION"] = "Delete";
Response.Redirect("../Main.aspx?Section=BlockedIPs");
} %>
akoyoon
30-Jun-11 17:27pm
View
when i use
int x = new int();
int.Parse(strID);
and
nick=" + x
i get error
System.Data.SqlClient.SqlException: Invalid column name 'nick'.
=======================
he same error when i use
Convert.ToInt32(strID1);
System.Data.SqlClient.SqlException: Invalid column name 'nick'.
=======================
can you post me the entire page after passing nick and use it instead if ugid
akoyoon
30-Jun-11 16:47pm
View
here is my page can you tell me what to do or how it suppose to be done
<%@ Page Language="C#" AutoEventWireup="true" %>
<% if (!IsPostBack)
{
if (Request.UrlReferrer == null)
Response.Redirect("/");
Session["EDIT_DS"] = null;
Session["ACTION"] = null;
string strID = Request.QueryString["ugid"];
string strID1 = Request.QueryString["nick"];
string strID2 = Request.QueryString["ip"];
string strID3 = Request.QueryString["LoggedTime"];
System.Data.SqlClient.SqlConnection SQLConnection = new System.Data.SqlClient.SqlConnection();
string ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
SQLConnection.ConnectionString = ConnectionString;
if (SQLConnection.State == System.Data.ConnectionState.Closed)
SQLConnection.Open();
System.Data.DataSet ds = new System.Data.DataSet();
string strQuery = "DELETE FROM [USER] WHERE RoomID=" + Session["CURRENTROOM_ID"].ToString() + " AND ugid=" + strID;
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand();
cmd.CommandText = strQuery;
cmd.Connection = SQLConnection;
cmd.ExecuteNonQuery();
SQLConnection.Close();
Session["ACTION"] = "Delete";
Response.Redirect("../Main.aspx?Section=BlockedIPs");
} %>
akoyoon
30-Jun-11 16:37pm
View
it didnot work i get now error
'int' does not contain a definition for 'parse'
akoyoon
30-Jun-11 16:29pm
View
column nick
akoyoon
30-Jun-11 16:22pm
View
can you give me example for the query
akoyoon
18-Jun-11 16:58pm
View
thanx so much for your help
akoyoon
18-Jun-11 16:36pm
View
i don't get any errors just when i try to insert Arabic character they get saved ?????
akoyoon
10-Mar-11 13:50pm
View
waiting to hear from you
akoyoon
9-Mar-11 10:30am
View
hi SAKryukov,
Can you reply me when you see that i need to know your answer
akoyoon
8-Mar-11 13:45pm
View
revived and reply you with message 20 minutes ago with details please confirm you received it and waiting your reply hope i get it today
akoyoon
8-Mar-11 11:01am
View
ok waiting you i have couple of projects some small things and some big projects
akoyoon
7-Mar-11 20:52pm
View
i sent you message and just checking if you received it to make sure
akoyoon
7-Mar-11 10:43am
View
hi SAKryukov,
Can I hire you to help me with some problems i have and somethings i need ???
waiting your reply
Regards
akoyoon
6-Mar-11 12:31pm
View
yes thanx
akoyoon
6-Mar-11 10:48am
View
thanx alot for your help i was able to do what i want like this
<script>
function getSelectValue(){
xxx=document.getElementById("xxxxxxxxxxxx").value;
if (xxx == 1){
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'1');
}
if (xxx == 2){
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'2');
}
if (xxx == 3){
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'3');
}
}
</script>
<select id="xxxxxxxxxxxx" style="font-size:9pt" önChange="getSelectValue();JavaScript:CtrlPan(this.options[this.selectedIndex].value);this.selectedIndex=0">
<option value="0">test 0</option>
<option value="1">test 1</option>
<option value="2">test 2</option>
<option value="3">test 3</option>
</select>
akoyoon
5-Mar-11 1:47am
View
done it like what you said and still the same thing i have to write number 3 myself if i want my code to work but what i want is to make code that will change the word Number with the value i select
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'Number')
akoyoon
5-Mar-11 0:58am
View
function _doBanMe write a line in table in the db that contain Name and Uid and Number
so i put this at the beginning of my code
<script type="text/javascript"><!--
function eventHandler(value) {
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'3')
}
--></script>
and replaced the drop-down menue with this
<select style="font-size:9pt" önChange="CtrlPan(value);this.selectedIndex=0;eventHandler(value)">
<option value="0">test 0</option>
<option value="1">test 1</option>
<option value="2">test 2</option>
<option value="3">test 3</option>
</select>
the code work and the row get add to the db fine what i need to do is make the Numer= selected item value
so my problem is how to write this line
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'3')
so instead of Number 3 he write the value
akoyoon
5-Mar-11 0:23am
View
i found that i can excute the function that i want by modifing the code to
<script type="text/javascript"><!--
function eventHandler(value) {
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'2')
}
--></script>
whats missing and i cannot make is i want instead of number 2 i can send the selected item value
itried this but it didnot work
i3 = _doBanMe('<%=strName%>', <%=strUid%>,'(value)')
akoyoon
5-Mar-11 0:12am
View
let me explain to you every thing i am a designer i donot have knowledge a bout programmer very simple things i know and i am making some changes to a customer the customer
have alot of buttons and every button do different things for examples
<input type="button" name="test" value="0" önclick="CtrlPan(0);_doBanMe('<%=strName%>', <%=strUid%>,'0');"">
<input type="button" name="test1" value="1" önclick="CtrlPan(1);_doBanMe('<%=strName%>', <%=strUid%>,'1');"">
<input type="button" name="test2" value="2" önclick="CtrlPan(2);_doBanMe('<%=strName%>', <%=strUid%>,'2');"">
for designing reasons i have to make these buttons in a drop-down menu any way after doing all your change like this
<script type="text/javascript"><!--
function eventHandler(value) {
alert(value);
}
--></script>
<select style="font-size:9pt" önChange="CtrlPan(value);this.selectedIndex=0;eventHandler(value)">
<option value="0">test 0</option>
<option value="1">test 1</option>
<option value="2">test 2</option>
<option value="3">test 3</option>
</select>
now i donot know who do i execute function doBanMe with different value for every item
thats my problem
akoyoon
4-Mar-11 23:01pm
View
i tried onChange like what you said
<select önChange="CtrlPan(value);this.selectedIndex=0;_doBanMe('<%=strName%>', <%=strUid%>,'(value)');">
as you see the onChange do 3 things
-call CtrlPan(value) ---- work fine
-retern the drop-down menu after selection to test ---- work fine
-execute function _doBanMe and send it 3 data
_doBanMe('<%=strName%>', <%=strUid%>,'xxxxxxxxxxxx');
my problem with xxxxxxxxxxxx instead i want to send the selected item value when i try like what you said it doesnot work
_doBanMe('<%=strName%>', <%=strUid%>,'(value)');"
akoyoon
4-Mar-11 21:10pm
View
you are correct my way didn't work at all i thought it can be done like this
<td align="center">
<select style="font-size:9pt" önChange="JavaScript:CtrlPan(this.options[this.selectedIndex].value);this.selectedIndex=0;">
<option value=0 önChange="_doBanMe('<%=strName%>', <%=strUid%>,'0');">test</option>
<option value=1 önChange="_doBanMe('<%=strName%>', <%=strUid%>,'1');">test1</option>
<option value=3 önChange="_doBanMe('<%=strName%>', <%=strUid%>,'3');">test2</option>
<option value=4 önChange="_doBanMe('<%=strName%>', <%=strUid%>,'4');">test3</option>
</select></td>
i am not a programmer and i donot understand how your way work or what i am suppose to do can you help me
akoyoon
4-Mar-11 20:30pm
View
thnx for your help but i found a very easy way to do what i want
akoyoon
4-Mar-11 19:23pm
View
i am not really sure how to use this code with my onChange
onChange="JavaScript:CtrlPan(this.options[this.selectedIndex].value);this.selectedIndex=0;_doBanMe('<%=strName%>', <%=strUid%>,'xxxxxxxxxxxx');">
akoyoon
4-Mar-11 19:07pm
View
when i press on any item one of the things the onchange function do is to
execute function _doBanMe('<%=strName%>', <%=strUid%>,'xxxxxxxxxxxx');
i need to send to function doBanMe instead of the value xxxxxxxxxxxx the selected item value
for example when i press on item test3
i need the onchange execute _doBanMe('<%=strName%>', <%=strUid%>,'4');
when press item test2
i need the onchange execute _doBanMe('<%=strName%>', <%=strUid%>,'3');
akoyoon
28-Dec-10 9:51am
View
your code will not be useful in case someone try to upload image with name like hi.asp;.jpg for example
your code do exactly what the code i posted do but it doesn't solve the problem
akoyoon
28-Dec-10 9:31am
View
i donot understand what you mean
Show More