|
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
|
|
|
|
|
hello all....
how i can load a div pop up to my site without click the link....
i want that, if main page will laod, the div pop up appear for 15 second....
and after 15 second that go to appear...
how i can do that... help plz...
|
|
|
|
|
Did you try with javascript?
|
|
|
|
|
function showPopup()
{
document.getElementById('popup').style.display='block'; // show the popup
var t=setTimeout("document.getElementById('popup').style.display='none';",15000); //set it to hide it 15 seconds later
}
<body onload="showPopup()">
<div style="position:absolute; width:100%; height:100%; left:0px; top:0px; display:none;" id="popup">
Buy my stuff you silly panda..blah blah
</div>
</body>
Im not by a pc( ) so i havent tested this, should work tho
|
|
|
|
|
I am using a Ajax Modal Popup control for displaying error messages. it is a simple panel with a lable and a button. I am setting the .Text option of the label = to the error message string version but when I show the popup the .Text of the label is not shown. The property is filed because I 've made a watch on it an it contains the error but it is not displayed. Can someone help please?
|
|
|
|
|
Are you using partial updates with AJAX? Just check whether the label control is inside the update panel and whether the trigger is set properly if update mode is set to conditional.
Either you love IT or leave IT...
|
|
|
|
|
the button which is calling the popup is insid the update panel while the popup is outside the update panel. May be this is the cause? How can I solve it?
|
|
|
|
|
Do you set the text property of the label control on the button click event?
Either you love IT or leave IT...
|
|
|
|