|
Hi Hafneef,
Are you saving values of check box i.e in database or XML file .
You need to save check box values and when you reload them dynamically then you need to put those values into check boxes.
Tip:
Check if you are missing "Ispostback"
|
|
|
|
|
how can we use datagrid in another datagrid in 2003
|
|
|
|
|
under the template column add an item template and within that you can have one more datagrid!
the logic of binding the data in the inner datagrid should be wriiten in itemdatabound event of the outer datagrid
Gautham
|
|
|
|
|
just do a search for nested datagrid...
<< >>
|
|
|
|
|
hi. i am creating a website which is related to music. Can anybody tell me how to play audio file in asp.net 2003. i also want to know how to select diffrent files from database or a particular location. please help me. thanks
KIRTI
|
|
|
|
|
Hi Kirti.
I'm afraid I don't fully understand your question. Are you just looking to play a background audio file when the user comes to a particular web page? If so, try the following link:
http://www.tips-tricks.com/sound.asp[^]
Can you please be more specific about what you're trying to accomplish?
Thanks.
-Goalie35
|
|
|
|
|
|
hi,
could someone please help with a (hopefully) simple question.
I'm trying to hide various elements on my asp.net web app page (I'm using c#), this is not a problem, i just use elementname.visible = false;
However, this seems to leave the element taking up space on my page which I don't want. Is there another way of doing it? Like for validation controls which have the display property set to dynamic or static? without using css? or if i do have to use css how do i change the class using something similar to the .visible method?
please help
many thanks
mark
ps. Im using VS 2005
|
|
|
|
|
Mark,
You can use a panel control.
Place your elements in your panel and later when required the panel should be made visible false, this should avoid your spacing problem.
Rate the message!
Gautham
|
|
|
|
|
wow, thank-you.
Don't know why i didn't think of that, thats me out of a tight spot
cheers for the speedy reply
mark
|
|
|
|
|
Welcome anytime!
Sometimes it happens, part of the coding life.
Happy Coding!
Gautham
|
|
|
|
|
A better solution is to use a placeholder control. That is what the placeholder control is made for.
Ben
|
|
|
|
|
kubben wrote: That is what the placeholder control is made for
no, it's not
Use the PlaceHolder control as a container to store server controls that are dynamically added to the Web page.
only two letters away from being an asset
|
|
|
|
|
You are right. I guess I should have looked closer at the original post. Thanks for the correction.
Ben
|
|
|
|
|
Hi,
I have created my grid view using the <asp:TemplateField> for all the columns.
Now I wish to Sort the corresponding Column wise, when I click on the respective Column Header (Its LinkButton Control).
How efficiently I can able to do this? Suggest me the idea behind this.
Regards,
Jay
|
|
|
|
|
You have to give SortExpression for each template.
SortExpression="USER_MASTER.USER_LEVEL_ID desc"
And on event sorting you have to use it in sorting event
like : e.SortExpression
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
hi mayank could u give me that sorting event full code
Thanks in Advance
|
|
|
|
|
I will created dynamic check boxes in panel but it losing the checked values when i reloads
Example :
no problem with bind data but when i click submit i need to reload the binddata() definitely other wise panel doesn't show any items.
if i reload then checked values are losing when i calling the submit button.
sub binddata()
dim ds as dataset // here i will take data source from which from database.
Try
ds=obj.GetSource()
For index = 0 To ds.Tables(0).Rows.Count - 1
chklist = New CheckBox
chklist.Text = ds.Tables(0).Rows(index).Item(0).ToString
chklist.ID = ds.Tables(0).Rows(index).Item(0).ToString
chklist.EnableViewState = True
Panel1.Controls.Add(chklist)
Panel1.Controls.Add(New LiteralControl("
"))
Next
end sub
problem below when i reloads the databind(). but i need to be definitely reloads the databind other wist panel doen't show any thing
Private Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit.Click
While index < ds.Tables(0).Rows.Count
DisplayPanel = CType(FindControl("panel1"), Panel)
chklist1 = CType(DisplayPanel.FindControl(ds.Tables(0).Rows(index).Item(0).ToString), CheckBox)
If Not chklist1 Is Nothing Then
chklist1.Text = ds.Tables(0).Rows(index).Item(0).ToString
If chklist1.Checked = True Then //here showing that not checking even thought i will check check boxes
objWeb.Addid(drlist.SelectedItem.Value, chklist1.ID)
End If
End If
index = index + 1
End While
end sub
this is haneef
this is haneef
|
|
|
|
|
haneef1 wrote: If chklist1.Checked = True Then //here showing that not checking even thought i will check check boxes
objWeb.Addid(drlist.SelectedItem.Value, chklist1.ID)
End If
here after this code u can capture chklist1.checked value in viewstate then when ever u are calling function check whether viewstate is empty or not if empty then ok else make chenklist1.checked = true.
here probles is because you are calling your bind funtion every postback.
Thanks,
Sun Rays
|
|
|
|
|
Full message: An error has occured in the script on this page
Line: 168
Char: 3
Error: Acess refuse
Code: 0
URL: http://......
Do you want to continue running scripts on this page? Yes \ No
' Internet explorer script error is obtained when the help icon is clicked for the second time without closing the previous help message.'
-- modified at 5:49 Thursday 12th April, 2007
|
|
|
|
|
My powers are a little weak today, so I failed to mentally visualize your code. Could you just post it here?
---
single minded; short sighted; long gone;
|
|
|
|
|
Full message: An error has occured in the script on this page
Line: 168
Char: 3
Error: Acess refues
Code: 0
URL: http://......
Do you want to continue running scripts on this page? Yes \ No
' Internet explorer script error is obtained when the help icon is clicked for the second time without closing the previous help message.'
My Browser = I E 6.0 SP2
|
|
|
|
|
That's not code.
---
single minded; short sighted; long gone;
|
|
|
|
|
I had a similar experience before, what you need to do is right click the ie->view source to find out the html source code and go to line#168 to see what error it is. Normally it is not a ie error but a program error such as unthrowed exception
|
|
|
|
|
Hello
VS 2005
I have my connection string in the web.config as followings
<br />
appSettings<br />
connectionStrings<br />
add name="serviceMasterConnectionString" connectionString="Data Source=CF_DEVELOP\realitysql;Initial Catalog=ServiceMaster;User ID=;Password="<br />
connectionStrings<br />
I can read the connection string using the following. but how do i change the connection string.
imports system.web.configuration<br />
imports system.configuration<br />
Dim cnnString As String<br />
cnnString = WebConfigurationManager.ConnectionStrings("serviceMasterConnectionString").ConnectionString()<br />
cnn.ConnectionString = cnnString<br />
I tried the following and got an error message.
config.ConnectionStrings.ConnectionStrings("serviceMasterConnectionString").ConnectionString = "new connection string"<br />
config.Save()<br />
Error:
Access to the path 'C:\Inetpub\wwwroot\CodeRedIncidents\web.config' is denied.
I would like to change the connection string at run-time and save it.
Does anyone have any code examples.
Many thanks,
Steve
-- modified at 5:56 Thursday 12th April, 2007
|
|
|
|