|
|
Hi,
i'm using and i need to refer to a treeview control from another .aspx , any help would be appreciated..
Thanks
|
|
|
|
|
in the frameset drag ur aspx page....and ur problem is solved..
|
|
|
|
|
Heya guys and girls,
I am writing a CMS page for a quiz and want to use the new GridView control along with an in memory data store as a datasource.
Here is is how I would like it to work.
The user logs onto the CMS quiz page to add or edit a quiz. The quiz can contain any number of questions and answers and once the user has added a title for the quiz and as many questions / answers as they want they then move on to the next page to preview / confirm results.
The problem with using a GridView in the classic way would be that I would set it up with a SQLDataSource. this however would mean when I updated or added a row then the database would imedietly be updated. I need a way of storing an off line represention of the data and only applying the changes if the user confirms the preview of the data on the next page.
I have tried using a DataTable but I get told it does not implement IDataSource. I also need to GridView to handle a sitation where there is no data and we only need to add rows (in the case of adding a quiz).
Has anyone come across this problem before?
Cheers
Steve
"Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."
|
|
|
|
|
You can use a dataTable and persist the datatable in viewState or Session state. You can also use a blank table and add a new row to the dataTable easily enough. As for the IDataSource, I don't know what that is.
|
|
|
|
|
I have 2 Forms
1. Display Employee Details( Like Employee Id, Name etc) in DataGrid.
2. Employee Edit Form.
When I click Edit Image on DataGrid, I passe the Employee Id using javascript code to the Popup window(Edit Employee Details) and Received all details . I done some Change and click Update botton. It's Update the details in database.
I want when I click update botton. The popwindow should close and Refresh the Datagrid on Previous Page(Display Employee Details)
I'm Using .NET2003 and VB.NET Backend code
Mohan Balal
|
|
|
|
|
Dear I'll suggest you to use multiview and view controls and use show hide tricks. make your life easy.
Multiview1.activeindex=0 or Multiview1.activeindex=1 or so on
For closing window you need to use javascript window.close() i guess. and when you are closing your window redirect user to your employee detail page using response.redirect(url). as you have to reconnect to database to fill the values into a grid. this is what i guess.
|
|
|
|
|
Thanks for your Kind suggestin
Any other Good way to some this problem
Mohan balal
|
|
|
|
|
I think this[^] article will give you a fair idea how to refresh the parent page from a pop up page.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi All
I have added a NewItem (SQL Database)in my Project where I added some table.
Now I would like to run some query, how can I connect with the database or whta will be the
Dim _Con as SqlConnection = New SqlConnection( ; ; )
Thans
Sarfarj Ahmed
|
|
|
|
|
Check
www.connectionstrings.com
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
is it possible to have a link/button/etc that when clicked creates a CVS from a dataset (that bit i can do) then presents it as a download without having to write the file to the server?
So basicly when they click the link/button it streams the data from the dataset into a text file that is being downloaded.
Thanks
|
|
|
|
|
Yes it is possible dear
follwoing code may be help full
//HTMl Document
public void Create_HTML_Document(string strBody,string filename)
{
try
{
string header = "<title>News letter";
header += strBody;
header += "";
header += "";
StreamWriter sw = File.CreateText(Server.MapPath("../NewsLetters/") + filename +".txt");
sw.Write(header);
sw.Close();
}
catch (Exception)
{
}
}
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
Hi,
i have a table with an INT column. The value is either 0 or 1. (It is a flag).
Now i'd like to bind it to an checkbox. 1 for checked. 0 for unchecked.
I tried this:
<asp:CheckBox ID="chkOutIn2" runat="server" Checked='<%# Bind("flag_out") %>' Text="Out" />
But i get an exception.
How do i get this checkbox checked?
(The update is no problem, i can convert the bool i get)
Thank you.
|
|
|
|
|
Try to do it on DataBinding event of Check box.
Hopefully it will work.
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
if it return only 0 and 1 then u can use the bool.parse() method,it will convert the value to bool, please check that
|
|
|
|
|
Ok i'll try it, but would you post an example how to integrate this method in my line? That's the biggest problem i have
|
|
|
|
|
hi,
how i will add rootnode,node and subnode dinamically to a treeview control
plz help.
p.sethi
|
|
|
|
|
Hi following code migth help you
//Populate treeview at root level
public void PopulateRootLevel( TreeView tv)
{
DataTable dt = new DataTable();
string sql = "SELECT MenuId,MenuName,MenuDescription,LinkName,(Select count(*) from menus where Parentid=mns.MenuId and menus.Status='Yes') as childnodecount,SecurityLevel FROM `menus` mns WHERE mns.Status = 'Yes' and mns.parentid is null";
try
{
connectToDB();
MySqlCommand cmdRoot = new MySqlCommand(sql, connection);
MySqlDataAdapter da = new MySqlDataAdapter(cmdRoot);
da.Fill(dt);
}
catch (Exception)
{
}
finally
{
connection.Close();
connection.Dispose();
}
PopulateNodes(dt, tv.Nodes);
}
//Populate nodes
private void PopulateNodes(DataTable dt, TreeNodeCollection nodes)
{
foreach (DataRow dr in dt.Rows)
{
TreeNode tn = new TreeNode();
tn.Text = dr["MenuName"].ToString();
tn.Value = dr["MenuID"].ToString();
tn.ToolTip = dr["MenuDescription"].ToString();
tn.NavigateUrl = dr["LinkName"].ToString();
nodes.Add(tn);
//If node has child nodes, then enable on-demand populating
tn.PopulateOnDemand = int.Parse(dr["childnodecount"].ToString()) > 0;
}
}
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
How to I use the top and left properties in ASP? I want to position my controls.
|
|
|
|
|
Are you adding the controls dynamically or or static ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
How to store data from one table to another table in different databases using webservices?
|
|
|
|
|
In .net fetch data in a DataSet and from your web service return this DataSet.
then you can use this DataSet.
for example using asp.net i created a webservice which is fetching data from Sql server then
I am passing this data to mysql server.
Do not hesitate for further question.
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
hi guys,
i'm using asp.net to build web application.
how can i store image in sql server express edition, and display it
at the web.
|
|
|
|
|
Store an image, or any binary information in a varbinary(max) column. In order to store or retrieve it you must use a byte[] . In order to display it you can create a special ASPX that overrides the existing render process and writes out binary information instead.
|
|
|
|