|
I think you should clear the view before updating.
|
|
|
|
|
inside ASPX
var childWin;
// the following funtion should be used to open the popup
function openWin()
{
childWin = window.open('default.aspx','anycontent','left=400, top=100, height=250, width= 250, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');
}
I have linkButton inside my page
What I want to is, when I click linkButton then it will call openWin()
thanks in advance
Sarfarj Ahmed
|
|
|
|
|
In Page_Load
linkButton1.Attributes.Add("onclick","return openWin()")
assuming you linkButton has an ID="linkButton1"
also, you should add a
return false;
to your openWin() function in order to stop the postback (unless you want ti to, of course, which case return true...)
NB you have a typo in your function#
status=n o
remove the space!
cheers
Fred
|
|
|
|
|
thanks
it does work
Sarfarj Ahmed
|
|
|
|
|
maybe... try this code from server-side
linkbutton1.Attribute.Add("onclick","openWin();");
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Hi Guys,
I installed Visual Studio 2005 on windows 2003 server and I am missing the ASP.NET Item Templates for C# when I try to create a new project.
I have done the following so far but no joy:
1) Close VS 2005
2) Delete the content of folder <instaldirectory>/ Microsoft Visual Studio 8\Common7\IDE\ItemTemplatesCache
3) excute prompt command : devenev.exe /InstallVsTemplates
I also checked the following as well:
open iDE then go TOOLS -> OPTIONS -> Projects and Solutions -> General
in the 'visual studio user items templates location:' edit control add the path to the default installation item templates
(on my system its C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ItemTemplates\CSharp\1033
cos im using C# :¬)
But no joy.
I spent the whole day today to solve this but still pulling my hair.
Anyone's help will be much appreciated,
happy coding!
|
|
|
|
|
hi,
I want to collect user credentials and encrypt them and stored in sqlserver again when i want to fetch i hv to decrypt them.
I am using vb.net, is there any namespace,class or method that doing the same .
please send the solution
thanks and regards
bikash
|
|
|
|
|
|
Is there a parent-like control available on web? I want to create a custom control which holds two panels. The two panels are containers for objects dragged from the toolbox.
Thnx, Eduard
|
|
|
|
|
Try www.google.com
I'm a Worm Bug
|
|
|
|
|
Why do you think people post their question here... Maybe because they cannot find a solution for their problem. Don't you think I tried google for this question?
|
|
|
|
|
i have one checkboxlist control and it display two checkbox on pageload but i want to select only one checkbox at a time. that is if i select the first checkbox the second checkbox should be unchecked and vice versa.
plz help me
thanks in advance
|
|
|
|
|
Then better use a radio button. Or assign a JS function to the onclick event of checkbox and loop through all checkboxes to find any other is checked
|
|
|
|
|
Hi all,
I have been assigned a weird project of all times.Its basically a form thats used for creating tables in the database. This is scenario...
There are three panels viz left ,right,bottom. The left panel contains a listbox containing the name of the controls(HTML/Server). Once he selects a control the right panel displays what properties that can be set for the controls and the constraints on that field(Primary key,Identity..).Once properties are set and the user hits add button, the selected control with selected properties is added to the bottom panel.
Once all contols are added,the user fills in the fields generated (textbox,dropdown.datepicker..) and on submit a database table should be created on the server with column names as the entered values and with constraints provided by the user.
Problems ..
>How to go about this stuff(.. only hint will do)
>retaining entered values during postback
>Setting database constraints
any help will be highly appreciated....
When you fail to plan, you are planning to fail.
|
|
|
|
|
www.Developerof.NET wrote: The left panel contains a listbox containing the name of the controls(HTML/Server)
For creating a database table and setting the attributes, why user has to select ASP.NET controls and add it dynamically ?
www.Developerof.NET wrote: Once all contols are added,the user fills in the fields generated (textbox,dropdown.datepicker..) and on submit a database table should be created on the server with column names as the entered values and with constraints provided by the user.
How about putting the required controls in a DataGrid/GridView ? Then you don't need to bother about managing the state on postbacks. I guess this will be enough.
In first columns put a textbox where user can enter field name, next column could be a dropdown where he can select the attributes like primary key. When add button is pressed, iterate through all the rows, find the controls and create a table creation statement and pass it to ExecuteNonQuery() method.
www.Developerof.NET wrote: retaining entered values during postback
Applicable when you are not using the DataGrid/Gridview method : You can create dynamic controls in any event before viewstate is loaded. Init() would be an ideal place for dynamic controls, and ASP.NET will maintain state for that.
www.Developerof.NET wrote: Setting database constraints
Create a table through design view (Enterprise manager). Right click on the table and choose copy which copies table creation statements to the clip board. Paste it somewhere and learn how constraints are applied through a query. Formulate your query in a similar way.
Hope it helps
|
|
|
|
|
N a v a n e e t h wrote: Applicable when you are not using the DataGrid/Gridview method : You can create dynamic controls in any event before viewstate is loaded. Init() would be an ideal place for dynamic controls, and ASP.NET will maintain state for that.
Sorry, just jumping in on seeing that: will it maintain custom attributes I add to controls if I do there and not in Load?
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
Will it be possible to generate dynamic controls on a button click(which causes postback) and add the newly created controls in a panel/div.
Since the init event is called only once i cannot use it on a button click event. Is there any other way round to manage the viewstate
When you fail to plan, you are planning to fail.
|
|
|
|
|
hi
i want know how i can save user Session For part of time that in this time
data that store in session for user not remove if close or leave the web site
but if the same user again open and browse same address can retrive data and information for user
i think and know that i can save sessionID in cookie for client and Session data in database for same ID and can retrive info but firs i know asp.net 2 have any default way for this and second my way is true or false
for example:
i want save user basket for almost 20 min that if user leave or close can retrive data if user come back in this min
Please Help Me
thaks
|
|
|
|
|
scorpion_man1982 wrote: i want save user basket for almost 20 min that if user leave or close can retrive data if user come back in this min
Which is your session mode. inproc ? When will you restore the data ? Immediately after user opens your site, or he/she has to login ? If you are restoring the data immediately after he/she took your site, another user can see the shopping cart of this user if he is using the system within the specified 20 minutes.
Alternatively, you can store the cart details in a table, and access it with user id. Make sure user has logged in and take the records from this table depending on the user id. Put a scheduled job in SQL server which checks this shopping table and removes old data (over than 20mins). This will be ideal and secure.
|
|
|
|
|
thanks N a v a n e e t h
i can use all session mode that help me
but i want other shop and site can get shop & accounting service from my site
and all of user when come my site is GUEST and no id
only way to khnow and save data for user use sessionID but i want use way that can retrive shopping data for user if user close your browser window and come back in 20 min
can you help me or any guide for solve this problem?
|
|
|
|
|
can any one help me to display images in datalist
|
|
|
|
|
|
hi,
i want to enable a html element while the checkbox is in checked state.The following code works fine in IE but not in Firefox.
...
and my script is.......
function findselective()
{ if(document.getElementById("findOption").checked==true)
{document.getElementById("findBy").disabled=false;
}
else{
document.getElementById("findBy").disabled=true;
}
}
Pls help me to solve this problem.
by
siva
|
|
|
|
|
sivarajanb wrote: document.getElementById("findBy").disabled=false;
Can you change the "findBy" to "findby" ( small letter "B") and try again??
I have tested with the code below. I works well.
function findselective()<br />
{ <br />
document.getElementById("findBy").disabled = !document.getElementById("findOption").checked;<br />
}
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
thanks Michael its working...
regards
siva
|
|
|
|