|
This is not really an ASP.NET question. ASP.NET could not do this, this will only work because you're on an intranet and can do it through your network, in theory.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Ye, you r right, then how i will get Hardware & Software Details through network. Because i have need only in my organization network.
Please give some idea to do in Intranet....
Thanks & Regards
raushan
|
|
|
|
|
I'm suggesting this is the wrong forum, and you should ask in the C# forum. I don't actually know the answer, I'm telling you the best place to find it.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I have html textbox and html listbox. If i type a letter in textbox corresponding names are populated to listbox.
After that i need to set the focus to my listbox when i press downarrow.
I am trying to implement this using onkeyup event by writing the follwing code:
if(key == 40)
{
//document.getElementById("ddlForResult").options(0).focus();
document.getElementById("ddlForResult").options[0].selected = true;
// var myControl = document.getElementById("ddlForResult");
// myControl.focus();
// myControl.select();
//document.getElementById("ddlForResult").selectedIndex = 0;
}
But the focus is not set into first element of listbox.
I dont know where i did a mistake, If anybody knows the solution for this please let me know....
|
|
|
|
|
dayakar_dn wrote: ddlForResult
Is this the client side name for the control ? If it's a server control, then use the ClientID property to get the client side id.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
In my page, I have a wizard control. Inside a Wizard control, there is only one textbox which checks for an unique document number. When the user types a document number in the textbox, I am checking whether it already exists in the database. if exists, I want to show a warning saying that this will be a revision of existing document.
User can either accept or reject this. How can I do this confirmation on the click on Next button of Wizard Control? I don't want to use a javascript for this. Is there any other way which i can achieve this? Please help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: I don't want to use a javascript for this
Well, you have no choice, unless you want to do a page refresh, to show a new page that asks the user to confirm, then posts back to load whatever page was requested.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Thanks Christian.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
I am creating Tree view from database.....but its returning only one Parent Node and one Child nodee.......why......this is my code:-
Dim db As Database = DatabaseFactory.CreateDatabase("See2Buy")
Dim cmd As String = "Select Cat.CategoryID, Cat.CategoryName,SubCat1.SubCat1ID,SubCat1.SubCategoryName From Cat INNER JOIN SubCat1 ON Cat.CategoryID=SubCat1.CategoryID ORDER BY Cat.CategoryID"
Dim rdr As IDataReader = db.ExecuteReader(CommandType.Text, cmd)
While rdr.Read
Dim cat As New TreeNode
cat.Text = rdr("CategoryName").ToString()
cat.Value = rdr("CategoryID").ToString()
TreeView1.Nodes.Add(cat)
TreeView1.Nodes.Add(cat)
While rdr.Read
Dim cat1 As New TreeNode
cat1.Text = rdr("SubCategoryName").ToString()
cat1.Value = rdr("SubCat1ID").ToString()
cat.ChildNodes.Add(cat1)
End While
End While
|
|
|
|
|
your SQL looks to me like it will always return one child for each parent.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi all,
I am saving an image in database in the image field but the image is getting saved in hexadecimal form inspite of the field defined as image type. When im trying to show the image through asp.net code im getting an error.
Please help me how i can store the image in database and show it.
|
|
|
|
|
There are two ways to store image in database......First one is to Convert the Image in Binary and store it in Database..........Second way is to store image physically at particular folder location and store Path of that image in Database
|
|
|
|
|
|
Image data type will store the content of an image file in binary format. It will not show you the visual representation of image that you stored in it when you see a record in SQL server.
Post the error message so that someone can help you to get the solution.
|
|
|
|
|
Hi,
This is my code for connecting Mysql with Asp.net.But i get the following error
"ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
My code is as follows:
Imports System.Data.Odbc
Imports System.Data.OleDb
Imports System.Data
Dim sConString As String = "DRIVER={MySQL Server 5.1}; SERVER=localhost;DATABASE=test;UID=root;PASSWORD=denny"
Dim oConnection As OdbcConnection = New OdbcConnection(sConString)
Dim sSQL As String = "SELECT * FROM personal"
Dim oDataAdapter As OdbcDataAdapter = New OdbcDataAdapter(sSQL, oConnection)
Dim oDataSet As DataSet = New DataSet()
oDataAdapter.Fill(oDataSet)
GridView1.DataSource = oDataSet
GridView1.DataBind()
Thanks
Denny
|
|
|
|
|
If you are running this code from your PC, Check whether you have installed ODBC Driver for MySQL.
Control Panel->Administrative Tools->Data Source(ODBC)->Driver Tab
|
|
|
|
|
|
From where can I get ODBC Driver for MySQL
|
|
|
|
|
|
I have a gridview(Gvpatientnm) that has another gridview embedded in it (gviewvisitdetailsinfo)
I have a sub that on the selected index changed that open a detailsview based on the gviewvisitdetailsinfo selected value in a modal pop up window.
I had this working, but it is erractic. I keep getting.
Specified argument was out of the range of valid values.
Parameter name: index
This all happens on selected indexchanged for the gviewvisitdetails grid
here is my code
1. Protected Sub gvVisits_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
2. Dim row As GridViewRow
3. For Each row In gvPatientsNM.Rows
4. Dim gvVisit As GridView = CType(row.FindControl("gviewVisitDetailInfo"), GridView)
5.
6.
7.
8. Dim varVisitid = gvVisit.SelectedValue
9. odsVisitsEdit.SelectParameters("VisitID").DefaultValue = varVisitid
10.
11.
12. Next
13.
14. dviewVisitsEdit.DataBind()
15. dviewVisitsEdit.ChangeMode(DetailsViewMode.Edit)
16. ModalpopupVisits.Show()
17. End Sub
|
|
|
|
|
Which line ? The error means what it says, you should at a minimum always check a value before using it as an index, to make sure it's within the correct range.
Member 1832081 wrote: odsVisitsEdit.SelectParameters("VisitID").DefaultValue = varVisitid
I'd say either varVisitid is not a right value, or VisitID is not found. You should break this code down and write it so it is safe. Then try to work out why it's failing.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
it's telling me it for this line
<pre> dviewVisitsEdit.DataBind()
Even if I take that out I still get it.
I have narrowed down the issue a little further.
If I only have one row in my top level Gridview - gvpatientname it works fine.
If I have 2 rows in the gvpatientnm grid Then the selected row for the embedded gridview -gvvisitdetails
stays selected if I change from one patientname row to another. So the gvvisit could have two rows selected under two patients.
Let me try to illustrate
gvpatientnm
PatID Name
1 Joe Jones
gvvisitsDetails
PatID VisitID
1 1234
1 6783
then for another patient the gvpatiennm gridview and gvvisit gridview are repeated
gvpatientnm
2 Mike Johnson
gvvisitsDetails
PatID visitid
2 4747
Here's a link to a screen shot of the grid
<GridView Pics (opens in new window)
Notice how both edit buttons are able to be selected, this causes a problem when I try to send the selected value to
my detailsview - dvvisitedit.
I am not sure how the best way to handles this is??
Help is appreciated.
Thanks
|
|
|
|
|
Got it to work
Dim gv As GridView = DirectCast(sender, GridView)
odsVisitsEdit.SelectParameters("VisitID").DefaultValue = gv.SelectedValue
dviewVisitsEdit.DataBind()
dviewVisitsEdit.ChangeMode(DetailsViewMode.Edit)
ModalpopupVisits.Show()
|
|
|
|
|
I want to create Tree through Database.........For Root nodes i wrote this code....can anybody guide me how to make child nodes.
i hav category(cat_id,cat_name),
sub category(sub_cat_id,cat_id,sub_cat_name) tables
under category node i have to fill subcategory names as child node
con.Open()
cmd = New SqlCommand("select cat_id,cat_name from tbl_category order by cat_name", con)
dr = cmd.ExecuteReader()
While dr.Read()
cat = New TreeNode()
cat.Text = dr("cat_name").ToString
cat.Value = dr("cat_id").ToString
TreeView2.Nodes.Add(cat)
End While
dr.Close()
con.Close()
|
|
|
|
|
Use this query to get the results
SELECT
Category.cat_id, Category.cat_name, SubCategory.Sub_cat_id, SubCategory.sub_cat_name
FROM
Category
INNER JOIN SubCategory ON
Category.cat_id = SubCategory.cat_id
ORDER BY
Category.cat_id
Now, loop through the results and while the catid is same add the subids as child nodes
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|