|
Dim myConnection As New SqlConnection("server=(local)\NetSDK;database=pubs;Trusted_Connection=yes")
Dim myCommand As New SqlCommand( _
"UPDATE Authors SET phone='(800) 555-5555' WHERE au_id = '123-45-6789'", _
myConnection)
myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
More Info :
Server-Side Data Access
|
|
|
|
|
|
how to find total rows in a datagrid after applying paging.
by gridview1.rows.count is giving total rows on that page .I want total rows in the grid
thanks in advance
|
|
|
|
|
Hi
You can get total number of rows from dataset or datatable as you are binding it to GridView
Harini
|
|
|
|
|
|
The thing is that the gridview is a display element,
thus its display at a certain moment shows the elemets on
that perticular page.
// ---- This will give you the elements in that specific page ----
int itemsInPage = GridView1.Rows.Count;
// ---- This will give you the total count of the elements in the GridView's source ----
int TotalItems = ((IList)GridView1.DataSource).Count;
* note the casting of the DataSource as an IList, this casting will require "Using System.Collections"
Hope this was helpfull,
Tzumer Edo : )
|
|
|
|
|
hi i want to use access as backend and i am not able to use webpart how can i use thathelp me to over comefrom error
The specified personalization provider, 'Microsoft.Jet.Oledb.4.0', is not registered.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.Provider.ProviderException: The specified personalization provider, 'Microsoft.Jet.Oledb.4.0', is not registered.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ProviderException: The specified personalization provider, 'Microsoft.Jet.Oledb.4.0', is not registered.]
System.Web.UI.WebControls.WebParts.WebPartPersonalization.DeterminePersonalizationProvider() +806641
System.Web.UI.WebControls.WebParts.WebPartPersonalization.Load() +30
System.Web.UI.WebControls.WebParts.WebPartManager.OnInit(EventArgs e) +497
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Control.InitRecursive(Control namingContainer) +198
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|
|
|
|
|
Hi All,
Can any body plz help for finding the source code for online forms (dynamic forms page). form definition, controls and validations storing in database.If any body is unable to understand it plz send me a message i will provide the full details regarding. Treat it as top priority.
Thanks and Regards
Ravindra Babu.
|
|
|
|
|
|
Hi Sandeep,
I have not Recieved Source Code for Online Forms.This was the Question posted. send me the source code i cannot find any link or message
phpBB.COM IN C# SOURCE FORUMS
|
|
|
|
|
hi all
i have image of html
img src="Images/sliderbuttonoff.png" id="zoom0" alt="demo" />
I want add event onmouseover, onmouseout to this image by javacript
id = zoom0 or zoom1 or zoom2 it is dynamic
I will try:
strPosition = 1 or 2 or 0
eval("document.getElementById('zoom"+ strPosition +"').onmouseover ='zoom"+ strPosition +".src='Images/northover.png';return true'");
but it error is: Expectes: ','
How will i do it??
Hope u help me.
Ex:
img src="Images/sliderbuttonoff.png" id="zoom0" onmouseout="this.src='Images/sliderbuttonoff.png';return true" onmouseover="this.src='Images/northover.png';return true" onclick="zoommap('0')" class="buttonBarButton0" alt="demo" />
-- modified at 23:49 Tuesday 27th February, 2007
|
|
|
|
|
I'm not very sure that I got you..
maybe. you can try like that..
<img src="Images/sliderbuttonoff.png" id="zoom0" onmouseout="javascript:this.src='Images/sliderbuttonoff.png';" onmouseover="javascript:this.src='Images/northover.png';" class="buttonBarButton0" alt="demo" />
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.
|
|
|
|
|
hi friend
i am using crystal report
for showing images
when i drag the image field from crystal reports toolbox
it ask me discrete value
the value which i set for this
images of that value will be shown for each record
instead of respective images
for eg if i set disrcete value = 1
and there are 15 records so for all 15 records it shows me image of "1"
record
how can i solve this
thanks
|
|
|
|
|
Hi
I think you dont need to give any value for discrete(leave it blank), you just need to drap and drop the image field in your report. Or Insert an OLE Object and point to the image field.
Harini
|
|
|
|
|
hi,
i want all the area names after clicking particular city in india map.i want the solution in javascript(without database connection) i.e directly from google.if any one knows the solution please respond me immediatly ,its urgent.
Himagiri
|
|
|
|
|
Hi guys.
I have ASP.NET application and I create folder the application to store files.
Later on these files are access by database so I can parse them.
In order for database (db is on another machine) to see these files I must us UNC file path.
Of course the folder has to be shared so db can access it.
I can easily create folder but have no idea how to make it share.
Can anyone tell me how to do that?
Is there any easy way I can programatically create share folder right away?
Any code samples will be appreciated.
Thanks a lot.
Alex.
|
|
|
|
|
|
Thanks. Do you have something like this using VB and not C#
Thanks.
|
|
|
|
|
why dont you use C# to VB.NET Converter?
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 man. That's exactly what I did .
Here we go, just in case you'll need it.
Import System.Management library into your project first then,
Try<br />
' Create a ManagementClass object<br />
Dim managementClass As System.Management.ManagementClass = New System.Management.ManagementClass("Win32_Share")<br />
' Create ManagementBaseObjects for in and out parameters<br />
Dim inParams As System.Management.ManagementBaseObject = managementClass.GetMethodParameters("Create")<br />
Dim outParams As System.Management.ManagementBaseObject<br />
' Set the input parameters<br />
inParams("Description") = "My Shared Files"<br />
inParams("Name") = partner_name<br />
inParams("Path") = Session("Path").ToString() ' This is a path to existing directory<br />
inParams("Type") = 0<br />
' Disk Drive<br />
' Invoke the method on the ManagementClass object<br />
outParams = managementClass.InvokeMethod("Create", inParams, Nothing)<br />
' Check to see if the method invocation was successful<br />
If (CType(outParams.Properties("ReturnValue").Value, Integer) <> 0) Then<br />
Throw New Exception("Unable to share directory.")<br />
End If<br />
Catch ex As Exception<br />
'Return e.Message<br />
End Try
|
|
|
|
|
I have developed a web application .NET 2.0. with dropdownlists in itemtemplates on a fovmview. Is it possible to get the dropdownlist to expand when the mouse is positioned over it?
|
|
|
|
|
When I try to assign a TextBox.Text property that contains a tag for example: into a string variable I get the following error.
<br />
A potentially dangerous Request.Form value was detected from the client (TxtName="<BR>"). <br />
TxtName is the TextBox control.
Please help.
|
|
|
|
|
That is a .NET protection to avoid cross scripting attacks. A clue Googled[^]. Just be careful with this because if you turn this off you must always always check the text for these types of characters, which you should be doing anyway.
I dont know of a good Regular Expression for this and if someone does I would love to see it too.
You might also try doing strVariable = Textbox.Text.UrlEncode
-- modified at 14:28 Tuesday 27th February, 2007
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
CleaKO wrote: strVariable = Textbox.Text.UrlEncode
Thankyou Cle
I ve tried strVariable = Textbox.Text.UrlEncode but it Textbox.Text doesn't have UrlEncode property. What do I need to import here?
|
|
|
|
|
Hi,
Can you send me the string that you are storing in a variable??
Just wanted to know whether you are storing 'm,./?>
|
|
|
|