|
Dim cb As New OleDbConnectionStringBuilder
cb.Provider = "microsoft.jet.oledb.4.0"
cb.DataSource = "c:/sample.mdb"
Dim cnn As New OleDbConnection(cb.ConnectionString)
Dim cmd As New OleDbCommand("select * from tablename", cnn)
cnn.Open()
Dim rdr As OleDbDataReader = cmd.ExecuteReader
Dim sbc As New SqlBulkCopy("server=localhost;database=sample;" + "integrated security=sspi")
sbc.DestinationTableName = "tablename"
sbc.WriteToServer(rdr)
sbc.Close()
rdr.Close()
cnn.Close
this my code,what is the problem in this code,check out
thanks
|
|
|
|
|
Hi Surjo,
Can anybody tell me how can we implement NTLM Authentication in asp.net 2005 ?
Regards,
Prajin.K
|
|
|
|
|
|
|
i have used web.ui button on my web page
but i am not able how to put an event handler for mouseenter
as we use for system.windows.forms.button
thanx
|
|
|
|
|
mouseenter?
If you want to add client-side attributes to a web server control, you must use Attributes.Add( attributename, javascriptcode ) in your code-behind. eg:
Button1.Attributes.Add("onclick", "alert('Ouch!'")
Fred
|
|
|
|
|
|
hi,
i want to use the ajax control tool kit but i am not able to add the ajax controls in the tool box waht is the reason.
Thanka
|
|
|
|
|
First U have to install the lettest verson of AJAX
Visit http://asp.net/ajax/
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
i had installed but gives error system.web.extensions not found
|
|
|
|
|
You need to install ajax extension for it.
|
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to use richText box in ASP.NET(web app.)
|
|
|
|
|
|
|
var gridViewCtlId = '<%=gridview1.ClientID%>';
var gridViewCtl = null;
var curSelRow = null;
var curRowIdx = -1;
function getGridViewControl()
{
if (null == gridViewCtl)
{
gridViewCtl = document.getElementById(gridViewCtlId);
}
}
function onGridViewRowSelected(rowIdx)
{
var selRow = getSelectedRow(rowIdx);
if (null != selRow)
{
curSelRow = selRow;
var cellValue = getCellValue(rowIdx, 0);
alert(cellValue);
}
}
function getSelectedRow(rowIdx)
{
return getGridRow(rowIdx);
}
function getGridRow(rowIdx)
{
getGridViewControl();
if (null != gridViewCtl)
{
return gridViewCtl.rows[rowIdx];
}
return null;
}
function getGridColumn(rowIdx, colIdx)
{
var gridRow = getGridRow(rowIdx);
if (null != gridRow)
{
return gridRow.cells[colIdx];
}
return null;
}
function getCellValue(rowIdx, colIdx)
{
var gridCell = getGridColumn(rowIdx, colIdx);
if (null != gridCell)
{
alert(gridViewCtlId)
return gridCell.innerText;
}
return null;
}
If i call it as:
For Each row As GridViewRow In GridView1.Rows
CType(row.FindControl("Textbox1"), TextBox).Attributes("onclick") = "javascript: return getCellValue("+row.rowindex.toString()+",1)"
It shows the heading of 2nd column only if i click on first row.
2nd row onwards it does not show any value.
<div class="ForumSig">sanjay kumar samantaray</div>
|
|
|
|
|
i want to make a tool tip window for my asp controll so that the tooltip message should appear in a window like thin insted of a simple text
thanx
|
|
|
|
|
Ajax toolkit has a callout control which may help you out.
|
|
|
|
|
|
Hello Friends
I want to get Minutes from string like "1:20"
Can any one know how to do this?
Thanks
Pathan
---------------------------------------------------
|
|
|
|
|
Imran Khan Pathan wrote: I want to get Minutes from string like "1:20"
<br />
string t = "1:20";<br />
string strTime() = t.split(":");<br />
<br />
Console.Write(strTime(0));
Console.Write(strTime(1));
hope it helps
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks
But you made mistak to write code
string[] h = tt.Split(':');
also I cant get h(0) or h(1) in c#
But Thanks I have solved problem
pathan
---------------------------------------------------
|
|
|
|
|
Yeah. I typed just like that so C# code are mixed with VB code.. I hope you got some ideas from my code at least ( I have to code in both C# and VB.NET for different projects everyday so i got confused sometime.. )
The correct one is as follwoing ~
string t = "1:20";<br />
string[] strTime = t.Split(':');<br />
<br />
Console.Write(strTime[0]);
Console.Write(strTime[1]);
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Dear All,
I want to create a template field say texbox inside a gridview to accept marks in different 5 subjects.
Marks fields should not be blank.
i want to have java script to check each textbox at client side only.
sanjay kumar samantaray
|
|
|
|
|
You can also use RequiredFieldValidator control.
Best Regard
pathan
---------------------------------------------------
|
|
|
|