|
Hi
How To Set TabIndex inside Each Template Field..
Means
On Pageload()
i have 10 gridview rows so i want to set focus
Gridview1.Rows[i].Cells[0]--as 1
Gridview1.Rows[i].Cells[1]--as 2
Gridview1.Rows[i].Cells[2]--as 3
---
---
---
But I am Getting The Tab For Rows[i].Cells[0]---10times
Rows[i].Cells[1]--10times
---
-----
how to get the tabindex for each gridviewrowcell Horizontally..
Thanks in advance..
|
|
|
|
|
Just set tabindex programatically..
It's solved the issue..
short tabindex = 29;
for (int i = 0; i < GridViewMedicineDetails.Rows.Count; i++)
{
DropDownList DdlMedicine = ((DropDownList)(GridViewMedicineDetails.Rows[i].Cells[1].FindControl("MedicineName")));
TextBox box2 = (TextBox)GridViewMedicineDetails.Rows[i].Cells[2].FindControl("Dosage");
TextBox box3 = (TextBox)GridViewMedicineDetails.Rows[i].Cells[3].FindControl("Quantity");
DdlMedicine.TabIndex = Convert.ToInt16(++tabindex);
box2.TabIndex = Convert.ToInt16(++tabindex);
box3.TabIndex = Convert.ToInt16(++tabindex);
}
But Remember the Gridrow count...
|
|
|
|
|
Your solution is somewhat correct, but it doesn't work for me cause i generate multiple lines during run time with the same controls so the tab only goes through the first column in the gridview then the others. Please help
|
|
|
|
|
Hi,
I want to write an ASP.NET application that can manipulate documents on a SharePoint portal. I want to be able to upload documents and do searches for keywords, etc.
I haven't worked with SharePoint before but I've set up a site and it all looks straight-forward enough.
I thought I'd just be able to work with the web services but it seems strangely sparse on features for the document workspace. It looks like I really need to implement my own web service on the SharePoint server which provides all the custom stuff my external application will need.
I thought I'd need to implement a separate ASP.NET application rather than write a page on the SharePoint server because it needs to be made available within an IFRAME in another (large) web application. However, the more I think about it, surely I should be writing a web part on the SharePoint server which can then be included as an IFRAME within my web application.
Also, I can't seem to get anything to work on my local machine, other than a basic call to the document workspace web service, e.g. <code>dws.GetDwsData()</code> - will I need to develop actually on the SharePoint server itself so that I can access the <code>Microsoft.SharePoint </code>assembly? That means installing Visual Studio on the SharePoint server doesn't it?
I have installed the SharePoint SDK but I still can't reference the <code>Microsoft.SharePoint </code>assembly
|
|
|
|
|
i want list box with horizontal scroll bar i have kept that in div
but i am getting 2 vartical scroll bar one is of list box and another is of that div i dont want now vertical scroll bar of that list box
|
|
|
|
|
just try setting Height="100%" for listbox and give height and overflow:Auto for Div.
|
|
|
|
|
I am creating a mp3 player through C#.Net I have kept a CheckBox that shows the play list. I have created the player such that it when ever the user cicks on the selection on checkbox the player play the corresponding song. so the user has to click on the next song to play the next song once the previous song is finished.
Now I would like to know is it possible for the player to automatically play the next song once the previous song is finished? If so how do I go about doing this on C#.Net
Please let me know... Thanks!
|
|
|
|
|
U better Post the question in C# Blog rather than Asp.net
|
|
|
|
|
if we want to send a image in a folder which is in my project on clicking a button after selecting a image from any directory in my computer through fileupload web control?
|
|
|
|
|
Save it in that folder using FileUpload control method.
Google on FileUpload control usage.
|
|
|
|
|
Try to search in Google or MSDN you'll get tons of samples for FileUpload control.
|
|
|
|
|
Try This Code
FileUpload1.SaveAs(Server.MapPath("images1") + "/" +TextBox2 .Text +TextBox4 .Text + FileUpload1.FileName);
FileUpload2.SaveAs(Server.MapPath("images1") + "/" + TextBox2.Text + TextBox4.Text + FileUpload2.FileName);
FileUpload3.SaveAs(Server.MapPath("images1") + "/" + TextBox2.Text + TextBox4.Text + FileUpload3.FileName);
cmd.Parameters.AddWithValue("@hotelexteriorview","./images1/" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName) );
cmd.Parameters.AddWithValue("@roomtype1","./images1/" + System.IO.Path.GetFileName(FileUpload2.PostedFile.FileName) );
cmd.Parameters.AddWithValue("@roomtype2", "./images1/" + System.IO.Path.GetFileName(FileUpload3.PostedFile.FileName));
FileUpload1.SaveAs save the file in server.mappath
cmd.Parameters.AddWithValue save the link in database
I Used this code long back
hope it may help
|
|
|
|
|
The two web services provided in the article of Sending messages in asp.net through we service are not working properly.Please suggest me the webservice which is working correctly.
Thankx & regards
Riti
|
|
|
|
|
Wow. Why is it that this forum gets so terrible this time of day ?
What on earth makes you think that someone would find this article, work out why the code does not work for you, write new code, and send it to you ? How about you get a grip on reality. Do your own work, or pay someone to do it for you. If you have a question on an article, ask in the article. If you post in the forums, be clear what you want., and what you have tried. I am sure the code in the article works, you just don't know how to use it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: Why is it that this forum gets so terrible this time of day ?
|
|
|
|
|
Hello All,
I have one select box in Html and i want to call javascript when scroll down event in IE 6.0
that is working with firefox as well as in IE 7.0
below call work in IE 7.0 but not workin IE 6.0
function first()
{
alert('scrolldown');
}
please help me out how can i solved above issue
Thanks in advance,
Anish Patel
|
|
|
|
|
Please help me.
Now I want to store the (text and image) combined to store in one field as
binary format. In later we want to retrieving the binary data from the database and display a IE page.
How it is possible?
Can you give a solution in VB.net
Thanking you,
abglorie
|
|
|
|
|
The only way to store two pieces of data in one field, is to combine them, for example, in a zip. If you were to store them in two fields, then it would be a lot easier. How do you do it ? With SQL, it's got to be one of the most answered questions on the web, and if you bothered to google it, you'd get far more in depth examples and answers than you'll ever get in a forum reply
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
hii
m trying to update the column ProductID of table Product.db
i have written the following code on pageload but its giving error:
syntax error in update statement.where m i wrong.plz guide.
the code is:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
String str2 = "Select PID From Product Where(ProductID='PID1')";
OleDbCommand cmd = new OleDbCommand(str2, conn);
conn.Open();
string m = cmd.ExecuteScalar().ToString();
m = "PID" + m;
conn.Close();
string str3 = "Update Product Set(ProductID='" + m + "')Where(ProductID='PID1')";
cmd = new OleDbCommand(str3, conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
populateddl1();
populateddl2();
}
}
|
|
|
|
|
Well, the brackets in your SQL are at a mininum, superfluous. Why would you change all product IDs from a known value to the new one ?
This code is an utter disaster, but I think it should work. However, I don't think this is what's blowing up. Are you sure this is the issue, because ASP.NET will only identify an 'update statement', if you try to use one of it's nasty, SQL holding controls that tries to update things for you. I think you've got the code there to use an updating control, and not the code in that control to do the update as it expects.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Actually i want to insert data in Product.db table
it has columns named:
PID: which is auto number
ProductID:Which is Primary key
and others columnss are:ProductName,ProductDescription,ProductPrice,VendorID;
i want the entries in ProductID table like when PID value is 1
ProductID value becomes PID1.in have written code for this on button click.but the Promblem occurs that when somebody deletes the rows of
the table the new PID Value doesnt start from 1.it start from last deleted value of PID.Now i want that ProductID value gets update according to the PID value.the code at button click is:
string str1 = "Select MAX(PID) From Product";
OleDbCommand cmd = new OleDbCommand(str1, conn);
conn.Open();
string max= cmd.ExecuteScalar().ToString();
if (max == "")
{
max = "PID" + 1;
}
else
{
int i= Convert.ToInt32(max) + 1;
string s1=Convert.ToString(i);
max = "PID" + s1;
}
conn.Close();
string str = "Insert Into Product(ProductID,ProductName,ProductDescription,ProductPrice)Values('"+max+"','" + txtprdtname.Text + "','" + txtprdtdescrp.Text + "','" + txtprdtprice.Text + "')";
cmd = new OleDbCommand(str, conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
str = "Select * From Product";
cmd = new OleDbCommand(str, conn);
OleDbDataReader dr1 = null;
conn.Open();
dr1 = cmd.ExecuteReader();
DropDownList2.DataSource = dr1;
DropDownList2.DataTextField = "ProductID";
DropDownList2.DataValueField = "ProductID";
DropDownList2.DataBind();
conn.Close();
so m trying to update the ProductID value AS i have default inserted
PID1 when the first row is inserted in Product table.
|
|
|
|
|
|
m not insertin PID in Product table but m inserting ProductID value and it is
necessary as it is primary key and cannot be null.
|
|
|
|
|
If it's the primary key, why not make it an identity ? Either way, why not write a data layer, or at least write code to a semi professional standard ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Well, this code is excrable. Why would you assume that any postback is a new row ? Why would you not do all your code for an insertion inside your event ? Why would you not have a data layer ?
Everything about this code is terrible. You should buy a book on ASP.NET and one on ADO.NET, and read them before writing any code. I assume no-one is paying for this code, if they are, you are a liar and a thief.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|