|
message
{"Could not find a part of the path 'C:\\Documents and Settings\\SJ\\My Documents\\Visual Studio 2005\\WebSites\\Results\\Upload\\test.ra'."}
and my file is at c:\upload\test.ra
|
|
|
|
|
File.OpenText("c:\upload\test.ra");
for more info check this result[^]
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
Hi All,
can you tell me that how can we find cursor position or selected text in HTML editor?
There can be 3 possibilities:
1. We can find the position of cursor.
2. We can find the starting and Ending position of selected text.
3. We can find the complete selected text.
I have done 2nd and 3rd task for IE but could not succeeded for Firefox.
Plz help me to find out the solution that can work in both IE and Firefox.
Further, I will explain that I am creating rich text box editor in asp.net. So I am trying to find the cursor position in content window(html page) of iframe.
Thanx for any kind of help...
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
|
I have embedded some secret in my webpage:
<br />
<input name="ctl00$txtEncryptedAuthToken" type="hidden" id="ctl00_txtEncryptedAuthToken" value="2'*—d-&#171;Y‚&#251;&#176;&#237;F7&#224;_]tL&#175;%v&#241;5&gt;&gt;8&#209;&#215;&#160;œf&#253;&#248;&#178;&#176;&#200;&#164;z&#187;&#208;&#220;J&#220;‚&#209;Ÿ&#245;p'/g&#237;`„@&#214;d?&#225;&#208;&#186;&#226;&#247;&#179;+)&#225;&#252;*e/(&#228;;&#215;S›&#211;&#239;&#184;&#252;_r&#239;&#201;&#191;&#207;J&#162;}2R9&#229;žv(›&#230;&#232;—&gt;q)&#163;&#232;ŠEY&#218;&#193;&#226;&#224;&#187;&#162;&quot;&#173;&#179;Ÿ&#168;&#166;—&#227;&#215;€w&#168;9,&#161;&#219;&quot;&#168;LhŸqž&#217;&#225;&#250;&#201;&#236;&#163;ˆ&#221;&#190;&#208;Q&#231;˜&#173;)&#246;&#179;wG&#209;&#176;P&#219;&#223;hpNu•&#222;&#188;’&#210;V&#210;&#241;&#195;<br />
T&#255;X=r&#239;&#219;‰h&#235;tŒ&#191;" /><br />
And on postback I get: "A potentially dangerous Request.Form value was detected from the client"
okay I understand this, http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_potentially_dangerous.htm[^]
But I don't think it is open/close tag (because there isn't one and I already HtmlEncode the string before I stick it on the page). And I certainly don't want to turn off page validation by setting ValidateRequest="false". What other alternative do I have?
Note difference between big/small open bracket character however:
› small bracket
> big/open bracket
Thanks
dev
modified on Monday, June 8, 2009 8:02 AM
|
|
|
|
|
devvvy wrote: I already HtmlEncode the string before I stick it on the page
Base64 encode/decode it instead.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
Excellent! It works.
Why HtmlEncode don't fix it?
dev
|
|
|
|
|
Because when it is read back in on the post back it will be automatically decoded for you and will look suspect.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
thanks
but I thought only open and close tag would be considered suspicious - and open/close tags are taken care by HtmlEncode
"it will be automatically decoded"
Do you mean the HtmlEncoded string will be "automatically" decoded in ASP.NET checking?
dev
modified on Monday, June 8, 2009 8:57 AM
|
|
|
|
|
Hi
I want to integrate Javascript code to detect the Foxit plugin. In Firefox I can detect it but it hangs while loading PDF and the on the other end with IE I am unable to create activeXobject .
This is the link in Javascript which I am trying
var obj = new ActiveXObject('FoxitReader.Document');
if (obj)
{
alert('Foxit found');
}
it always error "Automation server cant create object"
Any help would be hihgly appreciated.
Best Regards
Rizwan Bashir
|
|
|
|
|
Hello all,
I want to insert a Hindi text value into a mysql5.1 database from an asp.net TextBox when a "INSERT" button is clicked. And I also want to retrive the same value from MySql5.1 to an asp.net TextBox when a "SHOW" button is clicked. Please help me how this will be possible. I am uinging Visual Studio 2005 and C# for code behind.
Thanks in advance.
|
|
|
|
|
to do this, u can change data type of your table field to nVarchar. Then u will be able to insert & fetch the text of any language in database.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Hi Vijay,
Thanks a lot for replying,I tried it but there is no any DataType named nVarchar in MySql5.1 the same database working fine with php 5.1 code. but with asp.net when i try to use the same query it's sowing the value like '???????' in database after insertion.
|
|
|
|
|
actually i have never worked on 5.1 version. but no problem, i will try this and let u know. also if in database it shows encrypte data, then try to fetch it by query. It will return the result, as same as inserted.
Regards...
Vijay Jain
"One thing you can't recycle is wasted time."
|
|
|
|
|
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click
Session("NoOfRecords") = 0
Try
sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr")
'sqlConn.Open()
With sqlComm
.Connection = sqlConn
.CommandText = "OLE_InsertExamDetails"
.CommandType = CommandType.StoredProcedure
.Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text)
.Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009"
.Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One"
.Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text
End With
sqlDataAdap.SelectCommand = sqlComm
sqlConn.Open()
'sqlReader = sqlComm.ExecuteReader
'If sqlReader.Read Then
' While sqlReader.Read
' Response.Write("<br>")
' Response.Write(sqlReader(0))
' End While
'End If
sqlDataset = New DataSet
sqlDataAdap.Fill(sqlDataset)
Catch ex As Exception
lblmessage.text = "Error while inserting"
End Try
sqlConn.Close()
'MsgBox(dt1.Rows.Count)
MsgBox(sqlDataset.Tables.Count)
MsgBox(sqlDataset.Tables(0).Rows.Count)
' FillDataSet(sqlDataset)
'display()
End Sub
this click event shows one table and no of records in the table
but when i click on another command button on same aspx page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
' MsgBox(dt1.TableName)
MsgBox(sqlDataset.Tables.Count)
MsgBox(sqlDataset.Tables(0).Rows.Count)
End Sub
this it returns 0 and error cannot find table 0
modified on Monday, June 8, 2009 6:58 AM
|
|
|
|
|
On the click of another command button, other dataset might be re-initialized.
Either you love IT or leave IT...
|
|
|
|
|
govindi unal wrote: hv a code in click event of a command button in which i am filling a dataset
the dataset shows tables and table rows
but when i click on another command button
same dataset returns zero table and zero rows
Please put your code over here.
|
|
|
|
|
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click
Session("NoOfRecords") = 0
Try
sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr")
'sqlConn.Open()
With sqlComm
.Connection = sqlConn
.CommandText = "OLE_InsertExamDetails"
.CommandType = CommandType.StoredProcedure
.Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text)
.Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009"
.Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One"
.Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text
End With
sqlDataAdap.SelectCommand = sqlComm
sqlConn.Open()
'sqlReader = sqlComm.ExecuteReader
'If sqlReader.Read Then
' While sqlReader.Read
' Response.Write("<br>")
' Response.Write(sqlReader(0))
' End While
'End If
sqlDataset = New DataSet
sqlDataAdap.Fill(sqlDataset)
Catch ex As Exception
lblmessage.text = "Error while inserting"
End Try
sqlConn.Close()
'MsgBox(dt1.Rows.Count)
MsgBox(sqlDataset.Tables.Count)
MsgBox(sqlDataset.Tables(0).Rows.Count)
' FillDataSet(sqlDataset)
'display()
End Sub
this click event shows one table and no of records in the table
but when i click on another command button on same aspx page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
' MsgBox(dt1.TableName)
MsgBox(sqlDataset.Tables.Count)
MsgBox(sqlDataset.Tables(0).Rows.Count)
End Sub
this it returns 0 and error cannot find table 0
|
|
|
|
|
Please post code with proper formatting.
|
|
|
|
|
Protected Sub btStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btStart.Click
Session("NoOfRecords") = 0
Try
sqlConn.ConnectionString = System.Configuration.ConfigurationManager.AppSettings("Constr")
With sqlComm
.Connection = sqlConn
.CommandText = "OLE_InsertExamDetails"
.CommandType = CommandType.StoredProcedure
.Parameters.Add("@RollNumber", SqlDbType.Char, 100).Value = Trim(txtrollnumber.Text)
.Parameters.Add("@ExamDate", SqlDbType.DateTime).Value = "02-02-2009"
.Parameters.Add("@SemesterName", SqlDbType.Char, 20).Value = "One"
.Parameters.Add("@Papertype", SqlDbType.Char, 20).Value = RadioButtonList1.SelectedItem.Text
End With
sqlDataAdap.SelectCommand = sqlComm
sqlConn.Open()
sqlDataset = New DataSet
sqlDataAdap.Fill(sqlDataset)
Catch ex As Exception
lblmessage.text ="Error in inserting"
End Try
sqlConn.Close()
MsgBox(sqlDataset.Tables.Count)
MsgBox(sqlDataset.Tables(0).Rows.Count)
End Sub
it displays number of tables and corresponding records
but when i click on another command button ]
for number of tables it displays 0
and for number of rows it generates error cannot find table 0
|
|
|
|
|
|
GridView1.Columns.RemoveAt(columnIndex);
Regards
Saanj
Either you love IT or leave IT...
|
|
|
|
|
souravghosh18 wrote: I want to delete a gridview column programatically
You can remove like this way.
GridView.Columns.RemoveAt(<index>);
But, you should search google once before asking questions .
|
|
|
|
|
Hi There,
I want to start installation when user click on Install Button.If anybody know please suggest me some linqs.
Thanks.
|
|
|
|
|
ais07 wrote: I want to start installation when user click on Install Button.
So you want to execute installation file in web Application or in Windows Application.
if you want to do it asp.net web application you can do it using Process Class. But "This will Execute File ONLY ON SERVER NOT IN THE CLIENT" .
So, before putting question like that you should clear about your requirements.
Thank you
|
|
|
|