|
|
postback will happen as per you solution
|
|
|
|
|
Private dt As New DataTable
In Page_Load event
If Not Page.IsPostBack Then
dt.Columns.Add("fName", GetType(System.String))
dt.Columns.Add("lName", GetType(System.String))
viewstate("dt") = dt
End If
In btnAdd_Click Event
Dim dt As DataTable = viewstate("dt")
Dim dr As DataRow
dr = dt.NewRow
dr(0) = txtFname.Text
dr(1) = txtLName.Text
dt.Rows.Add(dr)
DataGrid1.DataSource = dt
DataGrid1.DataBind()
viewstate("dt") = dt
On Save Click, You should get table from viewstate variable and store data in database
Kumar Prabhakar
|
|
|
|
|
If you don't want a postback to occur when clicking the add button you can either use some javascript to save the values to a hidden field or use AJAX to place them in temporary storage (session, database...) until the save button is clicked.
|
|
|
|
|
Hai mark
Thanks for your time
Can you provide me with some snippet/article to do it using JavaScript.
|
|
|
|
|
Can any body help me to get a detailed book on Microsoft content management server 2002?
i am very much in a need of that.
advanced ThanX
Ramesh.Kanjinghat
|
|
|
|
|
Hi all
I want to put the (i, j) values into a 2 Dimensional Array
Can any one plz give the syntax of this
MYCODE
-----------------------------
Dim i As Integer
Dim j As Integer
For i = 0 To a
For j = 0 To b
Console.WriteLine(NewData(i, j))
Next
Next
------------------------------
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
IMHO, you may either pick up a basic programming book or see MSDN for this kind of questions.
Arrays in Visual Basic [^]
Also, your question should belong to the VB.NET forum, not the ASP.NET.
|
|
|
|
|
Hi
Thx for reply
'--------------------------------------------------------
Dim i As Integer
Dim j As Integer
For i = 0 To a
For j = 0 To b
Response.Write(NewData(i, j) & "")
Next
Next
'---------------------------------------------------------
In my code i am trying to add the (i,j) values to array
The array is not taking the values of (i,j)
I add like this
'---------------------------------
Dim Data As New ArrayList
data.add(NewData(i, j)
'---------------------------------
How can i retrive the (i,j) from here
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
I have a slight problem, I am developing an ASP.NET 2.0 website that uses themes (currently only one). The site theme is specified in web.config as <pages styleSheetTheme="White"/> . It was working great until I wanted to start adding RSS support. I am adapting an rss example from the Atlas wiki site starter kit. The aspx file is just an empty aspx file and the aspx.cs file generates the xml, and delivers it via Response.Write . I have used this method in previous asp.net 2.0 applications without problem, however this is my first time with themes.
My problem is this:
System.InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).
I tried setting EnableTheming to false for the page and had the same problem. Anyone have any ideas?
Matt Newman
Even the very best tools in the hands of an idiot will produce something of little or no value. - Chris Meech on Idiots
|
|
|
|
|
Hi there,
There are a couple of options suggested from the link[^]:
+ Make the header invisible.
+ Use the RSS Toolkit
...
|
|
|
|
|
The invisible header worked.. which seems odd but it works. I am looking into the RSS Toolkit.
Thanks for the help.
Matt Newman
Even the very best tools in the hands of an idiot will produce something of little or no value. - Chris Meech on Idiots
|
|
|
|
|
hi all,
Last time i posted a posted query on alphabetic paging of Datagrid in C#. there was no solution.
Expecting a solution for this new one:
i have javascript file named "validate-search.js"
i have to use a fuction called "validate-alpha-search" from the above .js file
how to include this function in my current asp.net page using Register clientScriptInclude?
thnaks in advance
Anu
|
|
|
|
|
RegisterClientScriptInclude doesn't work? Perhaps you would like to include how you are trying to use it.
|
|
|
|
|
hi friend!
Thanks for the reply.
i think u mistook my query. i would like to know how to use it in correct manner.
i used it like this: in the button_click event
String includejs = "validate-search.js"
Page.ClientScript.RegisterClientScriptInclude("validate-alpha-searh",includejs);
but when i click the button, nothing happens, so what was my mistake in here. plz help me.
|
|
|
|
|
I did not mistook your query (no matter how much you bold it. You did not present all of the information.
anu_chandu wrote: i used it like this: in the button_click event
The button_click event you now mention is a server-side event correct? It is too late to validate your search with js because the client has already posted back to the server. You should include the RegisterClientScriptInclude in the page load event so it will be present and usable when the page is initially rendered.
|
|
|
|
|
Hey all, I've got an aspx page that reads and writes cookies in both asp and javascript, the problem is when i go to read the cookies they are written in two different spots in IE (not a problem in Mozilla it seems). ASP writes them to the root dir (i.e. loclahost or www.blah.com) while js writes them to localhost/(page dir). Now when i go to read the cookie asp finds both while js only finds the on it wrote. How do i force them to be the same??
|
|
|
|
|
I need to stream mpeg-2 files from Windows Server 2K3 - basic requirement is that the file is gone from the user's system when done playing. Anyone have any experience in this area? Any SDK's or 3rd party tools?
|
|
|
|
|
microsoft streaming media server, or create a small flash player and stream it through that, this can be created dynamically by passing in arguments that are retreived from db or other source.
You can also access MS SMS in code but it must be installed on your server, so if it is not your server then flash is probably the easiest option.
hth
g00fy
|
|
|
|
|
Thanks for the input.
I do have access to the server, so I can install SMS. My understanding, however, is that SMS handles Windows Media formats only, and not other formats like MPEG-2 - am I wrong?
|
|
|
|
|
Hey i got a beautiful article posted by Alexander..The problem came when i downloaded the code and started working on it..Its about chat using XML and ASP....But i needed the same coding in ASP.NET..please checkout this link and tell me how to change a page information from Asp to ASP.NET...I am using C#, XML and ASP.NET for my site..Please help me with one page of translating this code for one page and i will goon with the rest buddies...
http://www.codeproject.com/asp/PalaceChat.asp[^]
|
|
|
|
|
hello All
i m using a master pages with some other pages placed in different directories
now the problem is that path is not working as it work for same directories
but i got its solution
but now when i publish my site at wwwroot
i again facing the same problem but this time it is not displaying for same directories pages also
can any one tell me the reason
Regards
Masood
|
|
|
|
|
What isn't displaying? Does the page load but not display correctly? Or do you get an error? Are you linking in any CSS stylesheets or JavaScript files?
|
|
|
|
|
Its not displaying Images and also if and also if i give image to a TD of table as background it display nothing
|
|
|
|
|
Use the asp:Image sever control for your images. When the parser renders your page it will adjust the image path appropriately. This won't happen with a HTML img tag.
|
|
|
|