|
hi all,
i want to redirect from the code behind (server side) C# file to a blank Page,
like about:blank on the ie;
using Response.Redirect("about:blank"); doesn't WORK!
do u have any idea??
10X.
|
|
|
|
|
Hi habeb
i dont think there is something available for that. but you can achieve that very easily using javascript. you can write some function like this
function openwin()
{
window.self.location='about:blank';
}
and then call this function on the click of button
|
|
|
|
|
Hi
You may combine function specified by gspowar with RegisterStartUpScript to run the function after the desired event has occurred, which will provide functionality euqivalent to Response.Redirect
Regards
Don't Quit
|
|
|
|
|
hi guys
In my form there is one treeview which is fill from database at the time of page load. And when user select any node from tree then information of that node will be displayed on gridview on right side.
And in grid view i have button field so when user click that button then i am passing control to next page with help of response.redirect and passing id of that node, where detail information is given.
when i am coming back to the original page then that tree is again loaded and all information will gone so i want to retain that state from where i went to next page of detail information
Is there any property so that i can save state of my form????
Regards,
DJ Rock
|
|
|
|
|
|
hi can you tell me more about it.
I dont know anything about state bag.
Regards,
DJ Rock
|
|
|
|
|
Dear Sir or Madam,
I need an implementation of one of the applications of parallel cellular automata.
Looking forward to hearing from you
Thanks in advance,
Mozhdeh Qeraati
|
|
|
|
|
CustCMD.CommandText = "INSERT INTO QuestionDetail(QuestionDetailID,DateofCreate, " & _
" Content,TimeofQuestion,OptionType,Answer1,Answer2,Answer3,Answer4,Answer5,Result1," & _
" Result2,Result3,Result4,Result5)Values('" & _
strQuestionDetailID & "','" & txtDate.Text & " ','" & strContent & "'," & _
intTimeofQuestion & "," & chkOptionType.Checked & ",'" & strAnswer1 & "','" & _
strAnswer2 & "','" & strAnswer3 & "','" & strAnswer4 & "','" & _
strAnswer5 & "'," & chkResult1.Checked & "," & chkResult2.Checked & "," & _
chkResult3.Checked & "," & chkResult4.Checked & "," & chkResult5.Checked & ")"
Try
objConn.OpenCnn(strConnection)
CustCMD.Connection = objConn.Conn
CustCMD.ExecuteNonQuery()
---------------------------
I have error message:Operation must use an updateable query.
when trying to insert a record into database, can everybody tell me what error is and how to solve it.
Thanks everebody very much
I tried so hard and got so far
|
|
|
|
|
This is an insert statement in "update" form
try this one
<br />
CustCMD.CommandText = "INSERT INTO QuestionDetail('" & _<br />
strQuestionDetailID & "','" & txtDate.Text & " ','" & strContent & "'," & _<br />
intTimeofQuestion & "," & chkOptionType.Checked & ",'" & strAnswer1 & "','" & _<br />
strAnswer2 & "','" & strAnswer3 & "','" & strAnswer4 & "','" & _<br />
strAnswer5 & "'," & chkResult1.Checked & "," & chkResult2.Checked & "," & _<br />
chkResult3.Checked & "," & chkResult4.Checked & "," & chkResult5.Checked & ")"<br />
<br />
Tell me what happens with u
Best Regards
3ala2
|
|
|
|
|
Thanks for replying me, but it still error with message:
Syntax error in INSERT INTO statement.
I tried so hard and got so far
|
|
|
|
|
Hi,
I dont know but there is no space between the "Result5)" and 'values' keyword. was it by mistake?
rockxuyenmandem wrote: Result5)Values('" & _
Also in the code you have not opened the connection. Was this by mistake or purposely not mentioned in your post ?
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Of course, I have opened connection, I also include the space between the "Result5)" and 'values' keyword, but it still error with the same message
I tried so hard and got so far
|
|
|
|
|
Are you using an Access database? Then you haven't set write permission on the file for the user account that is running the code.
---
b { font-weight: normal; }
|
|
|
|
|
I use Access database and i have setted the full control permission, but nothing is change, still error
I tried so hard and got so far
|
|
|
|
|
Which user account have you given full permission?
The ASP.NET code is usually run under the IIS_WPG or ASPNET account.
---
b { font-weight: normal; }
|
|
|
|
|
I have setted all account include IIS_WPG and ASPNET with full permission, but nothing is changed
I tried so hard and got so far
|
|
|
|
|
Are you using Access Database?
Check if its read only.
It should not be readonly.
Hope This Works...
|
|
|
|
|
Yes I am using Access database, I can't unset the readonly, because i uncheck Readonly option of the project folder, but when I view the property of the folder again, It still Readonly
I tried so hard and got so far
|
|
|
|
|
Hi All
I have done one function in asp.net.
Ival.Insert(1, New DBValues("Diagnosis", Diagnosis, mod_commonFunctions.DataType.DString))
Ival is my arraylist.
For i = 0 To IValues.Count - 1
nvalues = IValues(i) 'the value of ith index is assgning to nvalues(here value is form of DBvalue'
ParamList = ParamList & ", @" & nvalues.ColumnName
ColumnList = ColumnList & "," & nvalues.ColumnName
Next
ParamList = Trim(Mid(ParamList, 2))
ColumnList = Trim(Mid(ColumnList, 2))
sqlcmd.CommandText = "INSERT INTO " & Tablename & " (" & ColumnList & ") VALUES (" & ParamList & ")"
sqlcmd.Transaction = Tran
With sqlcmd.Parameters
For i = 0 To IValues.Count - 1
Dim pParam As New SqlParameter
nvalues = IValues(i)
pParam.ParameterName = "@" & nvalues.ColumnName
pParam.Value = nvalues.ColumnValue
.Add(pParam)
Next
End With
sqlcmd.ExecuteNonQuery()
When i reach executenonquery,then i got error:"Error converting datatype nvarchar to numeric"
I am not understand How to solve this error?If u have soln pls solve it and give me ans.
Thanks
monika
|
|
|
|
|
put a break point and check the values that u r inserting, do they match the data types in the database columns?
Best Regards
3ala2
|
|
|
|
|
Hi Monika !
Please check whether one of your table has nVarchar data type for a column. If yes then you will have to append a 'n' before the value part of it in the query. For example.
If i have a table structure like this --
Column Name DataType
ID numeric
Name varchar
DispName nvarchar
Note that DispName is nvarchar.
When you try to insert rows in the above table you will have to do something like this --
insert into xtable(ID,Name,DispName) values(1,'some name',n'some n varchar data')
Hope i am clear !!
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Just check out the datatype of which you r pass and the backend . Because both have the same datatype otherwise same error will generate
|
|
|
|
|
Hi,
Just want to ask a little tutorial on how I will goin to verify the email address of a user indicated in my registration form. Let say if he/she put an email address then once submitted, a verification email will sent to the email address she/he inputted. Registration will be successful once he/she made a verification using the email she/he indicated.
Thanks in advance.
|
|
|
|
|
u need to define a flag (boolean) variable, let's call "Verified" in the users table and give it the value of 0 if the user isn't verified and 1 if he/she is verified
in ur form u send the Verified value = 0
and then u send the email to the user, the email should include a link to activate the accoun, u can send something in the query string to activate the account
if u have other questions or u need some code snippests don't hesitate to ask again
ok man?
Best Regards
3ala2
|
|
|
|
|
hi.. thank you so much for your reply. Yes,I think it will be best if you can share a code sample on this for my reference.
Thanks in advance again
|
|
|
|