|
I want to display animated image in my XAML(WPF) application.Can anyone help me for that?
|
|
|
|
|
The code i have given to move the records when i click buttonNext,but it is not moving forward.
when i click on Next it has to show the reocrds as per the code i have given.To get previous records also.
Corrrect my code and giving exception as Parameter value cannot be null.
Dim ds As DataSet
Dim dr As DataRow
sedr = New SqlDataAdapter("Select * from Offices", dbconn)
sedr.Fill(ds, "Offices")
DG.DataSource = ds
For Each i In ds.Tables("Offices").Rows
TextBox2.Text = ds.Tables("Offices").Rows(0)("Office_id")
TextBox3.Text = ds.Tables("Offices").Rows(0)("address1")
TextBox4.Text = ds.Tables("Offices").Rows(0)("address2")
i=i + 1
Next
kissy
|
|
|
|
|
Hi kissy,
There is no need of using datagrid for moving to next records or retrieving the records into datagrid.
You can have a look at the following code, it will help u out of your problems:
Private Sub btnnext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnext.Click
Try
Dim sqlstmt As String = "select * from orders"
Dim ds As DataSet = New DataSet
Dim ConString As String = "server=.;database=Northwind;user id=sa;password=sa"
Dim con As New SqlConnection(ConString)
Dim myDataAdapter As New SqlDataAdapter(sqlstmt, con)
myDataAdapter.Fill(ds, "orders")
If Session("sessionid") <= ds.Tables(0).Rows.Count - 1 Then
txtretrieve.Text = ds.Tables(0).Rows(Session("sessionid"))("ShipName") 'retrieves values into the textbox using datasets
txtretrieve.DataBind()
Session("sessionid") = Session("sessionid") + 1
End If
Catch ex As Exception
lblexception.Text = ex.Message
End Try
End Sub
Hope this will help you out of your problems.
Thanks & regards,
Suresh Dayma
-- modified at 6:32 Monday 4th September, 2006
Everything is Possible!
|
|
|
|
|
But in my form i am not using any session,a simple record navigation using Datareader and dataset.Like that i have to do.
Dim ds As DataSet
sedr = New SqlDataAdapter("Select * from Offices", dbconn)
sedr.Fill(ds, "Offices")
For i = 0 To ds.Tables("Offices").Rows.Count - 1
TextBox3.Text = ds.Tables("Offices").Rows(i)("address1")
TextBox3.DataBind()
TextBox4.Text = ds.Tables("Offices").Rows(i)("address2")
TextBox4.DataBind()
TextBox5.Text = ds.Tables("Offices").Rows(i)("pincode")
i=i+1
Next
Will it work properly,or do i need to change any modifications.I have to use for next record,DataReader and for previous records,Dataset.
-- modified at 7:33 Monday 4th September, 2006
kissy
|
|
|
|
|
Kissy16 wrote: Dim ds As DataSet
sedr = New SqlDataAdapter("Select * from Offices", dbconn)
sedr.Fill(ds, "Offices")
For i = 0 To ds.Tables("Offices").Rows.Count - 1
TextBox3.Text = ds.Tables("Offices").Rows(0)("address1")
TextBox3.DataBind()
TextBox4.Text = ds.Tables("Offices").Rows(0)("address2")
TextBox4.DataBind()
TextBox5.Text = ds.Tables("Offices").Rows(0)("pincode")
i=i+1
Next
I think in this case only the last record will be displayed in the textboxes. What i will suggest you is to put the dataset in viewstate and then navigate it.
Best Regards,
Apurva Kaushal
|
|
|
|
|
But in my form i am not using any session,a simple record navigation using Datareader and dataset.Like that i have to do.
Dim ds As DataSet
sedr = New SqlDataAdapter("Select * from Offices", dbconn)
sedr.Fill(ds, "Offices")
For i = 0 To ds.Tables("Offices").Rows.Count - 1
TextBox3.Text = ds.Tables("Offices").Rows(i)("address1")
TextBox3.DataBind()
i=i+1
Next
Will it work properly,or do i need to change any modifications.I have to use for next record,DataReader and for previous records,Dataset.
-- modified at 7:36 Monday 4th September, 2006
kissy
|
|
|
|
|
Yes , you have to make modification to your code because your FOR loop is not coded properly.
The code which you have written in for loop is getting executed multiple of times.So, Try to do debugging.
and also let me know why you want to use both datareader and dataset for retrieval of next and previous records.
and yes u can use both of them.
If you dont want to use session then u can make use of label control(Server)
and assign 0(Zero) to it and if you dont want to show it(label) to user then you can hide it by setting its visible property to false.
So have a look at this code and make changes to it as per your requirements.
If lbl1.Text <= ds.Tables(0).Rows.Count - 1 Then
txtretrieve.Text = ds.Tables(0).Rows(lbl1.Text)("ShipName") 'retrieves values into the textbox using datasets
txtretrieve.DataBind()
lbl1.Text = lbl1.Text + 1
End If
Thanks and regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
Hi
Am having a Imagebutton whose ImageUrl is to be set from a field in database.
How to set to ImageUrl using a string(contains Filename of the image) from db.
Also,
Am having two imagebuttons ,but only one function which will be fired when either of the button is clicked.How to know which imagebutton has been clicked?(i need this because on clicking the image the ImageUrl of the imagebutton should be passed to another WebForm as QueryString)
<asp:ImageButton id="imgButton1" ImageUrl="file:///D:\Picture1.jpg" CausesValidation="False" Runat="server" Click="img_Click">
private void img_click(object sender,ImageClickEventArgs e)
{
ImageButton imgBt = (ImageButton)sender;
string url = imgBt.ImageUrl;//clicked imagebutton's url'
Response.Write(url);
}
But i couldnt make out.
Kindly help me in finding the solution..
Thanx
|
|
|
|
|
Dude,
The way you have approached will work. Set a break point and check.
|
|
|
|
|
Hi...
It worked finally.
:(But when i passed the ImageUrl as query string,the file path wasnt received in its correct format..
I couldnt find the 'slashes' that appears in the file path.It returns the whole path as a string itslef..
Can anyone plz tell me why it happens?
|
|
|
|
|
Hi,
We have a web page with a menu on the left hand side. On
click of the menu, we want some content to be displayed on right side but
without the whole page getting refreshed. We are using master pages
with the menu in the master page. Using frames is one alternative but
we are not game for that due to UI limitations. Will Atlas solve myissue? And if so can some one please let me know how? Any other
solution is also most welcome.
Thanks and Regards,
jagmit
|
|
|
|
|
hi,
i want code for auto unzipping files to local machine .
thanks
nilesh
|
|
|
|
|
|
I have developed an asp.net 2.0 application which has multiple user controls loaded in its master page [I've used the "@Register" option rather than the Page.LoadControl()]. Currently the user controls are loaded as per the way they are aligned in the page [top to bottom].
Ex:
<table>
<tr>
<td>
<uc1:Control1 ID="ucControl1" runat="server" />
</td>
<tr>
<tr>
<td>
<uc2:Control2 ID="ucControl2" runat="server" />
</td>
<tr>
</table>
Is there any way for my bottom aligned user control (uc2:Control2) to get loaded before the user control (uc1:Control1), because some of the properties of Control1 are dependent on Control2?
Any help is will be really appreciated.
Arun
|
|
|
|
|
Usually controls shouldn't be dependent of each other at all.
How do the controls depend on each other? If possible make the dependency so that it only requires the other control to be in a previous state, e.g. in the Load state require that the other control is created, or in the PreInit state require that the other control is loaded.
---
b { font-weight: normal; }
|
|
|
|
|
windows can store your logon information for network locations and web sites
in Control panel->user Account->manage my network password->> (Stored User Name and Password)
and you can see this informatin in a list and if you click properties you can see
server name & user name & password.
can add new entry and change them or remove if you want
How can i retreive the list of server name & username for all stored account
(put them in dropdownlist or saved them on DataBase)
using asp.net or vb.net code
can any one help me ????!!!!
Saeed
|
|
|
|
|
Hi,
Im doing a module which looks similar ot MS word. Like, we can draw images like BOX, CIRCLE, ELLIPSE by selecting the images from the tool bar. Those thins are coimpleted. Now i want to select all the images which has been drawn on the shart, like selector box ir by draggind mouse over all the images and select all the images under the dragged rectangle image.
Everything has been done using java script to draw images.
If any one has any ideas please let me know.
Regards
Mukilan.
|
|
|
|
|
Hi all,
I have a TreeView control in a C# ASP.Net 2.0 project and (so far) have not been able to work out how to persist the state of the expanded/collapsed nodes between postbacks. At present, whenever the page comes back from a postback all nodes are expanded instead of just the ones the user physically expanded. Is this functionality available as part of the standard treeview or does the developer need to write it?
I found Tom John's article (http://www.codeproject.com/vb/net/TreeViewDataAccess.asp) regarding serializing the state of the TreeView but I still find it hard to believe the ASP.Net control does not cater for this in some way itself.... am I missing something simple?
TIA for any help/suggestions etc.
Mike
|
|
|
|
|
In case your problem is still there, you can have a look at the SelectAction property of each TreeNode that you have built.
|
|
|
|
|
Can anyone recommend a hosting company in the US that offers asp.net and MS SQL ?
I'm looking more for a cheap solution rather than a million-hits-a-day capable hosting provider.
|
|
|
|
|
Hi
if i store information in a hidden label or textbox the javascript cannot see it, is there a way i can save it on the page so the javascript will see it?
thanks
|
|
|
|
|
Use a hidden field, e.g. an input field with type="hidden".
---
b { font-weight: normal; }
|
|
|
|
|
Is it possible to parse an HTML/aspx file and extract only the body without having to go through the entire file line by line? And then copy those contents into the body of another aspx file. The file to be parsed will be present in the same server.
Any sort of help would be appreciated.
Thanks
There is no patch for ignorance
|
|
|
|
|
Using Visual Web Developer Express and ASP.net 2.0, I have an aspx page with a gridview showing all records from a dataset (from a SQL-server table connected via. ODBC). On the same page is a detailsview control showing details of a single record in the same dataset as the gridview above.
When I display the page in browser (while still in design mode) the page displays fine. I add a new row by clicking the "New" link on the detailsview control, enter data in all fields (except the auto-incremented pk field, which is not displayed), press "Insert" to commit, and get error message...
"ERROR [23000] [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'Categories' when IDENTITY_INSERT is set to OFF." The identity column in question is the primary key field iCategoryId, it starts at 1 and increments by 1 for each new row.
How can I set IDENTITY_INSERT to ON? As far as I can see, it is on already, because if I add rows manually (eg. via. enterprise manager), there is no problem with the primary-key field autoincrementing.
It makes no difference if I remove the gridview from the form.
Has anyone any ideas how to solve this problem? Any help would be appreciated.
Alan
|
|
|
|
|
Hi
Question is about setting up of the web.config:
I Create a very basic web app that just shows the date and time. On my pc it works, however when I load it up to the server and I try to access it I get an error. I have set the web.config so as to show me the error, however it still does not show the error.
The server I am referring to is Tollon.uk. What are the general settings that a server like this could require.
Thanks
Marco-Hans
|
|
|
|