|
I want to send some data from web form to a procedure, when a user click's on some table cells (APS Table) but asp.net table cells dont have any "OnClick event". How can i do this please?
Soroush Sarabi
|
|
|
|
|
hey
refert to this link to emule the onclick server side.
http://www.vbforums.com/showthread.php?t=376630
_______________
Hugues Gauthier
|
|
|
|
|
Dear All profestional of PHP code.
I would like you to show the way to write the code to solve above problem that as bellow :
I have 1 or other menu like
Advertisment, Sports, and......
when i click Advertisment Menu it drop down sub menus that they can consist of other sub menu and can like to other page.
sovanngold
-- modified at 1:15 Thursday 1st June, 2006
|
|
|
|
|
|
Hi i am getting this message below are my aspx and vb codes please help me.
aspx page
--------------------
<datalist id="dlScHead">
ItemTemplate
<table>
<tr>
<td>.. ctype(DataBinder.Eval(Container.DataItem,"ScoreCardID"),string)..</td>
</tr>
</table>
datalist ID="dlScChart" DataSource=..(GetRecords(Cstr(DataBinder.Eval(Container.DataItem, "ScoreCardId")))) ..
ItemTemplate
/ItemTemplate
<table style="FONT-SIZE: 0.8em; font-face: Arial" cellPadding="5" width="100%" align="center"
border="0">
<tr>
<td colSpan="3">
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter1").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter2").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter3").tostring()) %>
<%# Server.htmlDecode(DataBinder.Eval(Container.DataItem,"Quarter4").tostring()) %>
</td>
</tr>
</table>
/ItemTemplate
/asp:datalist
and code behind
--------------------
in page load event i am doing
dlScHead.DataSource = GetRecords(Nothing)
dlScHead.DataBind()
and in function getRecords i am doing
Function GetRecords(ByVal scID As String) As SqlDataReader
Dim bizProgName As String = Request.QueryString("bizProgId")
Dim CommandText As String
Try
objConn = New SqlConnection(dbPath)
objConn.Open()
If scID = Nothing Then
Dim da As New SqlDataAdapter
da.SelectCommand = New SqlCommand
da.SelectCommand.Connection = objConn
da.SelectCommand.CommandText = "select scorecardId,bizProgId,scorecarddesc,businessgoal,strategy,quarter1,quarter2,quarter3,quarter4 from textData where bizProgID='" & Request.QueryString("bizProgId") & "'"
dr = da.SelectCommand.ExecuteReader(CommandBehavior.CloseConnection)
If dr.HasRows Then
'lblError.Text = ""
Else
'lblError.Text = "No records returned"
End If
GetRecords = dr
Else
cmd = New SqlCommand("select distinct measure_id from measuredata where scoreCardId = '" & scID & "'", objConn)
Dim da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dtid As New DataTable("measureid")
da.fill(dtid)
'select all columns with id
Dim cmd1 As SqlCommand = New SqlCommand("select * from measuredata where scorecardid = '" & scID & "'", objConn)
Dim da1 As SqlDataAdapter = New SqlDataAdapter(cmd1)
Dim dt As New DataTable("measuresource")
da1.Fill(dt)
Dim datarow As DataRow
For Each datarow In dtid.Rows
Dim chart As New DataGrid
Dim myview As New DataView(dt)
' dim chart as new mycos.mycoschartweb
myview.RowFilter = String.Format("measure_id='{0}'", datarow.Item("measure_id"))
chart.DataSource = myview
chart.DataBind()
Dim i As Integer
For i = 0 To dlScChart.Items.Count - 1
dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)
Next
Next datarow
' GetRecords = PlaceHolder1.FindControl("placeholder1")
End If
Catch ex As Exception
Response.Write("error on child-- here" + ex.ToString + "
")
Finally
End Try
End Function
i am getting error in
dlScChart.Items(i).FindControl("placeholder1").Controls.Add(chart)
please help thanks
|
|
|
|
|
Hi everyone
I have a very annoying problem - I use an iframe to display some content from another website, I have set the iframe height to be the same height of the inner content - but still, scrolling is available. I don't mean the scrollbars - those are disabled using the scrolling="no" property, what I mean is that the user can click and drag the mouse to scroll the iframe content, and this I want to disable. Is that possible at all?
Since the iframe height and the inner content appear to be at the same height, I'm not really sure why it happens. Maybe there is a white area beneath the content, I know that if I add 20 pixels or so to the iframe height then scrolling is disabled, but then I get an ugly white gap between this iframe content and whatever it is under it.
I would appreciate any help, please note that the solution must be from my side (the outer iframe) as I don't have access to change the inner content source code.
Thank you,
Gal
|
|
|
|
|
Hi guys,
I am a newbie to the world of web designing and I have been trying a few examples to familiarize myself. I am using both javascript as well as vbscript to do that.
I am trying to extract a word (lets say "table") and count them how many times they occur in the html file. After finding the word, I want to extract a pattern that follows the word and then write the result into a file.
How do I proceed? Any useful pointers will be helpful. I am not looking for actual code but any general directions so that I can learn it myself.
|
|
|
|
|
I'd have a look at regular expressions, they would be ideal for what you are trying to do.
|
|
|
|
|
|
Hello all!
I'm wondering, can I use a MaskedTextBox in my ASP.NET 2.0 web form? I see it in my VS2005 toolbox when creating windows applications, but it isn't in my toolbox when creating a web form. How can I implement a MaskedTextBox in an ASP.NET 2.0 web app? for example, a phone number input textbox would already show the ( ) - in the textbox. Has anyone done this?
Thank you!
"Half this game is ninety percent mental."
- Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
|
|
|
|
|
Hi there,
AFAIK, there's no built-in masked TextBox control in the ASP.NET 2.0, you check out the ASP.NET Custom Control Gallery[^], we used the telerik's one and happy with it.
|
|
|
|
|
|
Just use <asp:textbox textmode="password" ....="">
Mihai Voicu Drebot
|
|
|
|
|
|
seccond time today this happens to me
<asp:textbox textmode="Password" ....="">
this actualy adds some more functionality, like disabling copy/paste, etc
Hope i understood correctly what you need
|
|
|
|
|
|
it just doesn't like what i put there
use the asp:TextBox, with attribute TextMode="Password"
|
|
|
|
|
|
Hello I want to create a tab control just as given in
http://www.indianindustry.com/
-- modified at 7:35 Wednesday 31st May, 2006
|
|
|
|
|
search the articles, a couple of people here have posted tab controls.
|
|
|
|
|
Hi,
I am developing a project, that feeds new record into a db, all is well so far, however i am having a problem sorting out one the errors, if a duplicate key is being input, the system error displays, i would like to know how ta catch the expeption where a duplicate key is beeing input?
Cheers
Crazzy SH!T
|
|
|
|
|
A better way would be to ensure that is is not possible to try and enter a duplicate key at all, as exceptions are quite processor heavy, but:
try
{
}
catch (SqlException sqlEx)
{
}
finally
{
}
|
|
|
|
|
Hey all,
When I bind my datagrid with a dataset that contains a date column.
<asp:BoundColumn DATAFIELD="paydate" HEADERTEXT="Pay Date">
</asp:BoundColumn>
The datagrid display the date as my currentculture by default, I was pretty excited about that. but when I change my regional setting to UK or US or whatever, Datagrid still displayed fr-CA regional settings. I've to force the culture throught the web.config to see the change.
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB"/>
Why when I load the web application with no settings in the web.config it still displayed fr-ca settings instead of those i set in regional settings. ?
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
I look at the machine.config, there is nothing set too.
Anyone have idea ?
Regards.
_______________
Hugues Gauthier
|
|
|
|
|
Hi there,
Basically, when the ASP.NET is running, the default culture of the application is set based on the ASPNET process identity's locale, it means that it is set based on the ASPNET(or NETWORK SERVICE) account, and not the current log-on account. And as you may already know that you can overwrite this default value by setting the culture info in the web.config file or in the Page directive (for a specific web page), or in code.
|
|
|
|
|
Hey,
Thanks
This is redirected me to another solution so here it is.
I used the languages of the browser. So a user can specify any language that he wants.
To set the languages of the browser, go in the menu Tools-Internet Options and look for Languages(button), I use IE7 beta2
You have to put this in the global.asax
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
If Not Request.UserLanguages Is Nothing Then
Dim cultureInfo As Globalization.CultureInfo = Nothing
Dim index As Integer = 0
While cultureInfo Is Nothing AndAlso index < Request.UserLanguages.Length
Dim language As String = Request.UserLanguages(index)
If RegularExpressions.Regex.IsMatch(language, ".{2}-.{2}") Then
language = RegularExpressions.Regex.Match(language, ".{2}-.{2}").Value
Try
cultureInfo = New Globalization.CultureInfo(language, False)
Catch ex As NotSupportedException
'Invalid culture specified
End Try
Else
Try
' Try to create a specific culture with the neutral culture specified
cultureInfo = Globalization.CultureInfo.CreateSpecificCulture(language)
Catch ex As ArgumentException
' No default specific culture available for the neutral provided.
End Try
End If
index += 1
End While
If cultureInfo Is Nothing Then
cultureInfo = New Globalization.CultureInfo(DEFAULT_CULTURE, False)
End If
Threading.Thread.CurrentThread.CurrentCulture = cultureInfo
Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo
End If
End Sub
I Love Code Project
_______________
Hugues Gauthier
|
|
|
|