|
Hi! i have a RadioButtonList & bind it to data source. now it has three radio button. whose text is X, Y & Z. i have make autopostback property TURE of RadioButtonList . now i want when i select third radio button having text Z,there should no post back & on selecting on X & Y there should no post back. is it possible?
|
|
|
|
|
I Never Look Behind wrote: i have make autopostback property TURE of RadioButtonList . now i want when i select third radio button having text Z,there should no post back & on selecting on X & Y there should no post back. is it possible?
Upto my knowledge NO. Because radiobuttonlist will be rendered as individual HTML radio buttons. Once you made AutoPostback to true, ASP.NET will add a javascript function to this radio buttons for posting the form. So you won't be able to call your javascript function on radiobutton click to prevent page from posting.
To do this I suggest use individual radio buttons. If you don't know the number of radio button's at design time, then put a ContentPlaceHolder and add radio button controls there with your custom javascript function to post data.
|
|
|
|
|
Yes Navneeth is right instead of using the radiobutton List you can use radio buttins with same name attribute. if you have written any javascript then doucment.getElementByName will return you all same name radiobuttons
Now here you can make auotpost back property true or false to any radio button
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
If you are adding individual radio buttons to RadioButtonList at run-time then, before adding a radio button, set its "AutoPostBack" property to 'TRUE' or 'FALSE' as per your requirement.
|
|
|
|
|
|
hi all,
i am having one empty table(without any row) on the page and on click of a button i am creating multiple rows in the same table(which includes one checkbox and two text cells) from javascript. i am having one server side oclick event too for the same button, my problem is that once i am clicking on the button it's client side onclick is creating rows in my table and displaying properly but once it's server side is getting fired and page is getting postback then after post back my table is again displaying empty means it's not retaining any row created from javascript.
please can anyone tell me how to retain rows created from javascript after postback? this is my jscript function, which i am using to generate multiple dynamic rows for the table:-
function addrow()
{
// doing some getelement things here
// doing some getelement things here
// doing some getelement things here
// my table id is tblSavedCriteria
var newRow = tblSavedCriteria.insertRow();
var oCell = newRow.insertCell();
oCell.innerHTML = " People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
|
|
|
|
|
Please help me.
I creat a form like this
label_1 as display the employee ID
textbox_1 as employee address
Now I want update the address
I writing a coding like this
dim con as sqlconnection(connectionstring)
dim cmd as sqlcommand("select empID from Employee", con)
dim adapter as sqldataadapter(cmd)
dim ds as new dataset
try
if session("ds") is nothing then
con.open()
adapter.fill(ds,"Employee")
session("ds") = ds
endif
finally
con.close()
endtry
My form is
asp:label id=label_1 text = "<%=session("ds")("EmpID")%>" runat="server"
....
I need how to display emplyee ID (EmpID) into the form as label_1
this action continue the button click the next employee ID
display the Label_1 upto end of table. (assume the table
contain 20 records)
I try the session state but not working.
Please give me actual coding in VB format.
Thanking you in advance
abglorie
|
|
|
|
|
abglorie wrote: dim con as sqlconnection(connectionstring)
I am not much familiar to VB. but this line looks incorrect. Becuse SQLConnection is not instantiated using new keyword.
abglorie wrote: asp:label id=label_1 text = "<%=session("ds")("EmpID")%>" runat="server"
This is a server control. So you can access it from the code behind file instead of writing this. To move to next record in the dataset, you need to maintain current position somewhere. When button is clicked, take this value and move to the next record.
|
|
|
|
|
abglorie wrote: I try the session state but not working.
I doubt that. Looks like you're storing the dataset in the session, that will work just fine. It obviously won't display anything, and is a waste of time if you don't need this data on another page.
ds.Tables(0).Rows(0)("id")
should work, assuming hte column name is id. I recommend reading a book on ADO.NET so you can do this without just stabbing blindly at it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I'm working on a project and making an Email Inbox style tree on my web page. Can anyone help me out how to get this sort of tree you how can i make it using Ajax.
Some good suggestions or links required.
Regards,
Mohsin Shahzad
|
|
|
|
|
Hi guys need help in creating a Multiple Worksheet in Excel using ASP.net in vb
Any one has info on that. I kind of dunno how to start
KaKaShi HaTaKe
|
|
|
|
|
I was hoping to use objects instead of simple types as fields in my business objects but am finding that the ObjectDataSource does not recognize the objects when generating the schema. Is there a way I can get the ObjectDataSource to recognize my objects/classes as data fields in the object?
eg:
public class IntField {... }<br />
public class BO {<br />
public readonly IntField IntValue = new IntField();<br />
private IntField _AnotherIntValue = new IntField();<br />
public IntField AnotherIntValue { get {return _AnotherIntValue; } }<br />
}
The schema generated for BO does not include the IntValue or AnotherIntValue.
I would really like to use these heavyweights so I can have advanced functionality in my fields without having to code it in each property.
I guess this boils down to: Can I use anything other that public properties with get/set as fields in business objects?
-- modified at 11:18 Friday 21st September, 2007
|
|
|
|
|
I have struct ErrorPage mapping.
is it possible to accses a struct without using new keyword?
|
|
|
|
|
No.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Saksida Bojan wrote: is it possible to accses a struct without using new keyword?
Static members in struct can be accessed without creating a object using new keyword.
struct Employee
{
public static string Name = "";
}
This can be accessed like Employee.Name
|
|
|
|
|
But, of course, this means there can only be one value.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: But, of course, this means there can only be one value.
YES correct because it is static
|
|
|
|
|
One value, is all that i need.
I am using this struct to have a collection of the filesname for each error.
|
|
|
|
|
yes u can create struct object without using new keyword. Since struct is a value type u can create struct object as normal value type.
Raja
|
|
|
|
|
How can i find witch page is currently loaded from static class. I Prefear i woud get page file name.
|
|
|
|
|
Request.FilePath should give you what you need.
Paul
|
|
|
|
|
Thanks, Thats what i needed. Didn't thought about it.
|
|
|
|
|
People,
I'm currently analising a ASP classic system and proposing a migration to ASP 2.0 .Net. However, I was trying to scope the advantages of skiping .Net 2.0 and going 3.0 right on, but I can't find any article or comparison chart that states the advantages and disadvantages of 3.0.
Anyone can point me to such an article or give me some insight?
|
|
|
|
|
3.0 doesn't really changes anything from 2.0 for web development. If you are getting ready to begin development and still analyzing you may consider looking at 3.5 with Visual Studio 2008 since it offers things that actually affect web devs.
A few examples:
-Linq (if you don't know find out, it's amazing.)
-javascript debugging
-split code/design screen like DreamWeaver (Finally!)
-You get to pick the target framework (2.-, 3.0 or 3.5)
-design time support for nested master pages
If it's a fairly simple app though then 2.0 will more than suffice.
hth
Al
|
|
|
|
|
What about support to stuff like WCF?
|
|
|
|