|
thanks my friend ....
jooooo
|
|
|
|
|
Hi
My Gridview is displaying data as.
SN ID
1 C120
2 C121
3 C124
4 C121
5 C128
6 C120
7 C121
when i click on one button this above grdview is displayed .my dataset is returning these 2 values.
I want to display Count column in Gridview as
SN ID Count
1 C120 1
2 C121 1
3 C124 1
4 C121 2
5 C128 1
6 C120 2
7 C121 3
if ID e.g in above gridview C120 is repeating 2 times & C121 is repeating 3 times.So
I want to display as above shown Count .
Please help How i do this.
Thnx
GroCareer
|
|
|
|
|
write your SQL so it returns this extra column, then bind to it. Always the easiest way. you could just add the column and use code to set the values, but why not do it in the DB?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How to calculate Count's value in SQL.
Please help how to write query for this.
Thx
Grocareer
|
|
|
|
|
It could be an expensive query, I'm thinking you need to ask for the count of items with the same Id, whose row number is less than the current one.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have answered the same question in SQL / ADO / ADO.Net
Try this:
SELECT
SNO,
Id,
(
SELECT
(COUNT(*) + 1)
FROM
table1 b
WHERE
b.SNO < a.SNO AND
a.Id = b.Id)
FROM
table1 a
OR
SELECT
SNO,
Id,
(
SELECT
COUNT(*)
FROM
table1 b
WHERE
b.SNO <= a.SNO AND
a.Id = b.Id)
FROM
table1 a
Harini
|
|
|
|
|
hi,
I am using vs2005 and as backend I am using sql server 2005 express edition that is coming inbuilt with vs 2005. But it does not support the reporting service facility and i have to use that service in my project.
After surfing from net I came to know that in the Sql Server 2005 express edition with advanced feature reporting service is present. So I downloaded the source for it and installed in my PC. But it didn't show me the option of BIDs in VS2005 for generating reports. So I again installed Sql server 2005 developer edition without uninstalling the sql server express edition, as a result it generated many instances in microsoft sql server---> MSSQL.2,MSSQL.3......,MSSQL.7 .Even after this it didn't show me BIDs in VS2005. Now when I am running my original project with connection string as follows
str = "Data Source=.\\SQLEXPRESS;AttachDbFilename=E:\\Bizworld21\\App_Data\\Database.mdf;Integrated Security=True;User Instance=false"
oConnection.ConnectionString = str
it gives me an error as below...
"Instance failure."
How to solve this problem? Pls help me
|
|
|
|
|
I think you just want
"Data Source = E:\\Bizworld21\\App_Data\\Database.mdf;Integrated Security=True;User Instance=false"
either that, or you want something like
data source = localhost;etc
without the stuff about the file path.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If you are a vb.net programmer, is ASP.Net hard to learn?
|
|
|
|
|
I would say no
But everything is relative
Every head is a world
Alexei Rodriguez
|
|
|
|
|
Its just a different mindset since every postback reload the page. Also thier are some more technologies you need to know like AJAX and Javascript.
|
|
|
|
|
The main thing to understand, is what ASP.NET is, and what it does. It's just an engine for HTML, and each page gets loaded in memory in order to create one iteration of a page, then it gets reloaded the next time it's needed. If you understand that seperation, and that VB.NET can only generate script, it cannot run in the browser, then the rest is just a new framework to learn.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
So I've been looking at this for 2 days now. I've created a simple custom control, a button to fill a lable with the current time from the server. I've tried to inherit updatepanel and I've tried updatepanel as a composit control but no luck. I click on the button and nothing happens.
Here is the code if you think you can set me straight...
Imports System.Web<br />
Imports System.Web.UI<br />
Imports System.Web.Script.Serialization<br />
Imports System.Web.UI.WebControls<br />
<br />
<br />
Public Class FormFooter<br />
Inherits WebControl<br />
Implements IPostBackEventHandler<br />
<br />
Public Event Click As EventHandler<br />
Private _SM As ScriptManager<br />
<br />
<br />
<br />
Protected Overrides Sub CreateChildControls()<br />
<br />
<br />
MyBase.CreateChildControls()<br />
Dim parent As Control<br />
Dim container As Control<br />
If SM Is Nothing OrElse Not SM.EnablePartialRendering Then<br />
<br />
container = New Control<br />
parent = New Control<br />
<br />
<br />
Else<br />
<br />
<br />
<br />
<br />
Dim up As UpdatePanel = New UpdatePanel<br />
up.ID = "UpPan2"<br />
Dim trigger As AsyncPostBackTrigger = New AsyncPostBackTrigger()<br />
<br />
trigger.ControlID = ClientID<br />
trigger.EventName = "Click"<br />
<br />
up.Triggers.Add(trigger)<br />
container = up.ContentTemplateContainer<br />
parent = up<br />
End If<br />
<br />
Dim cmdUpdate As Button<br />
Dim lblUpdate As Label<br />
lblUpdate = New Label<br />
lblUpdate.ID = ClientID & "$txtTime"<br />
lblUpdate.Text = " N O W"<br />
<br />
<br />
cmdUpdate = New Button<br />
cmdUpdate.Text = "Add Time"<br />
cmdUpdate.ID = ClientID & "$cmdUpdate"<br />
<br />
<br />
container.Controls.Add(lblUpdate)<br />
<br />
container.Controls.Add(cmdUpdate)<br />
<br />
<br />
Controls.Add(parent)<br />
<br />
<br />
End Sub<br />
Private ReadOnly Property SM() As ScriptManager<br />
Get<br />
If _SM Is Nothing Then<br />
_SM = ScriptManager.GetCurrent(Page)<br />
End If<br />
Return _SM<br />
End Get<br />
End Property<br />
<br />
<br />
<br />
<br />
Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent<br />
Select Case eventArgument<br />
Case "click"<br />
OnClick(New EventArgs)<br />
End Select<br />
End Sub<br />
Protected Sub OnClick(ByVal e As EventArgs)<br />
SM.RegisterDataItem(Me, "<h3>Sending data from click3</h3>")<br />
RaiseEvent Click(Me, e)<br />
<br />
End Sub<br />
<br />
<br />
End Class
|
|
|
|
|
How to display Crystal Report in asp.net2.0 using crystal report viewer.
sabarees
|
|
|
|
|
There is a virtual path(http://server1/files/test.xls). From asp.net web app, I have to redirect to above path. If test.xls does not exist in the path, I have to display unauthorized page. I tried using if (File.Exists(Server.MapPath(URL))) but it gives an error "it is not a valid virtual path".
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
You have to try check if exists file like this:
if (File.Exists("C:\\Directory\\FileName.txt")<br />
...
I Love T-SQL
|
|
|
|
|
Try this
if(File.Exitst(Server.MapPath("~/files/test.xls")))
{
Redirect to the path;
}
else
{
Redirect to Unauthorized page.
}
Server.MapPath append the specified path to root path.
ex: http://server1 say root path then in if contion check for the path
'http://server1/files/text.xls'
smile
|
|
|
|
|
hi all,
i need to read the content of table's cells in a web page. How i do it?
thanks
|
|
|
|
|
Obviously using javascript. The main thing is, you need to put some ids in the tags for the table, so you can use getDocumentById to find the table. Then you can iterate over it's children.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
|
I'm using HttpWebRequest and HttpWebResponse to query a remote server. I plan to load the returned xml into an XMLDocument, but the HttpWebRequest.GetResponse() method fails with a 403 "Forbidden" error.
I am able to get a response when I put my domain username and password as plain text into the request's Credentials member, but of course I'd like to avoid having that information in the application.
I thought that code along these lines (found at http://claytonj.wordpress.com/2006/09/04/run-code-under-the-iis-authenticated-user-context/)
would solve my problem:
using System.Security.Principal;
if (User.GetType() == typeof(WindowsPrincipal))
{
WindowsIdentity id = (WindowsIdentity) User.Identity;
WindowsImpersonationContext impersonate = id.Impersonate();
//perform tasks under the impersonated user
//*** ***//
//revert back to local ASPNET account
impersonate.Undo();
}
else
{
//user isn’t authenticated
}
But, I still get the 403 error. I think the impersonation is failing because the WindowsIdentity.ImpersonationLevel property is always "Impersonation." I think this needs to be "Delegation" to reach the remote server (I'm behind a firewall and corporate proxy), but the property is read-only so I can't set it.
My Question: What do I need to configure in order to get the ImpersonationLevel property to be of the TokenImpersonationLevel.Delegation type?
Let me know if this requires clarification.
|
|
|
|
|
Hello everyone, I've searched forums, articles, msdn, and google [which I bet many people who post here don't do often] and after hour and a half I'm still stuck. See if you can give me a hand.
Thing is I have a site with a web.sitemap, in my MasterPage I've got a Menu and a SiteMapNavigation control to act as breadcrumb. Here it is:
<code><siteMapNode title="Peticiones" url="" description="Gestión de Peticiones de Documentación">
<siteMapNode url="~/Peticiones/PeticionDocumentacion.aspx" title="Nueva Petición a GADSA" description="Nueva Petición a GADSA" />
<siteMapNode url="~/Peticiones/RecepcionDocumentacion.aspx" title="Recepción de Documentación" description="Recepción de Documentación">
<siteMapNode url="~/Peticiones/InformarIncidencias.aspx" title="Informar Incidencias" description ="Informar Incidencias"/>
</siteMapNode>
<siteMapNode url="~/Peticiones/UbicacionPeticiones.aspx" title="Ubicación de Peticiones" description="Ubicación de la Documentación que se ha solicitado." />
</siteMapNode></code>
My problem is that SitemapNode "Informar Incidencias". I delete this node from the menu once it is databound so users cannot click on it. It links to a form used to report erros, which is only accessed when needed so I don't want it to appear on the menu. Well, whenever I do <code>Server.Transfer("~/Peticiones/InformarIncidencias.aspx")</code> I'd like the breadcrumb SiteMapPath control to update to my current site location, but I haven't found any way to this, so my breadcrumb only updates when I click on some menu item.
Does anyone know a way so I can set the web application current location programatically?
Thanks in advance
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
hi
when i go to copy the website to ftp host ,,
I studied how to deploy ,, but when i try to copy to my new web site
I found that it's contail two dirctories ( data - wwwroot ),
I copid all my project files after that i go to test my amazing web loooooool ,, i founded nothing ,,,,
then i delete all files and try to copy all to wwwroot , i can't do it ,,
jooooo
|
|
|
|