|
Ok Yusuf,
you can add client side code on server side and that will be execute on client side if you don't know then let me know thank You
Vinod
Software Engineer
EBC Publishing Ltd
Lucknow(India)
|
|
|
|
|
You can use ClientScriptManager[^] to add client scripts.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi,
Am working on ASP.Net windows application. I have a form2 which searches records from
database based on search word entered in textbox and it displays list of records in a datagridview in form2 and i have provided a view button inside datagridview column. on click of view button the particular record details will be displayed in form3. Now i have to place next button in the form3 which should move through all the records on click of next button. How to traverse through all records on click of a button. Am getting error as cannot convert from System.EventArgs to System.Windows.Forms.dataGridViewCellEventArgs.
Thanks in advance.
public void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
sample(this,e);
}
public int sample(object sender, DataGridViewCellEventArgs e)
{
currentRow = e.RowIndex;
try
{
IdString = dataGridView1[0, currentRow].Value.ToString();
nextrow = dataGridView1[0, currentRow + 1].Value.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
if (dataGridView1.Columns[e.ColumnIndex] == editButton && currentRow >= 0)
{
string FileName = dataGridView1[1, currentRow].Value.ToString();
string Fileno = dataGridView1[2, currentRow].Value.ToString();
string Filetype = dataGridView1[3, currentRow].Value.ToString();
string Address = dataGridView1[4, currentRow].Value.ToString();
Form3 f3 = new Form3(IdString, nextrow);
f3.Show();
}
return nextrow;
}
}
public void button3_Click(object sender, EventArgs e)
{
exam(this, e);
}
public void exam(object sender, DataGridViewCellEventArgs e)
{
Form2 frm2 = new Form2();
test1 = frm2.sample(this, e);
myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\\DFMS\\DFMS.mdb");
myConnection.Open();
string query = "select SlNo, FileName, Fileno, Fileloc, Filetype, Address, Surveyno, A, G, Sqmt, Resdate, Issueddate, Remarks from SRCH where (id = " + test1 + ")";
OleDbCommand cmd = new OleDbCommand(query, myConnection);
OleDbDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
label26.Text = dr["SlNo"].ToString();
label24.Text = dr["FileName"].ToString();
label23.Text = dr["Fileno"].ToString();
label22.Text = dr["Fileloc"].ToString();
label21.Text = dr["Filetype"].ToString();
label20.Text = dr["Address"].ToString();
label19.Text = dr["Surveyno"].ToString();
label18.Text = dr["A"].ToString();
label17.Text = dr["G"].ToString();
label16.Text = dr["Sqmt"].ToString();
label15.Text = dr["Resdate"].ToString();
label14.Text = dr["Issueddate"].ToString();
label13.Text = dr["Remarks"].ToString();
}
myConnection.Close();
test1 = test1 + 1;
}
}
}
modified on Saturday, March 21, 2009 8:10 AM
|
|
|
|
|
pradeepc_mca wrote: Am working on ASP.Net windows application.
Seriously !
pradeepc_mca wrote: How to traverse through all records on click of a button.
Do you thing any body has the time to read your thousands line of code ?
Please. put those line which you think to relevant with your question. Otherwise nobody will going to give you the answer. If you ask question properly, it will help you get the answer and also help use to give the answer.
Thanks !
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I ve edited the quote now by removing code. plz check it out now.
|
|
|
|
|
pradeepc_mca wrote: I ve edited the quote now by removing code. plz check it out now.
I have checked and it is nothing related with ASP.NET. You are doing it Windows Application. Am I right? Please post it properly in C# forum.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hello
Why it happens ?
i have used java.util.zip file to zip and unzip file.
when it is ziping it gives :
Server was unable to process request ---> exception of type java.util.zip.ZipException.
is Zip file is corrupted ?
Thank you
vijaya
|
|
|
|
|
kvijayajyothy wrote: have used java.util.zip file to zip and unzip file.
when it is ziping it gives :
Server was unable to process request ---> exception of type java.util.zip.ZipException.
Where are you getting this exception ?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Is this java code. Try the Java [^]forum
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
hello,
in order to jump to the cold water of asp i need a push.
i am getting this error :
Could not load type 'HelloWorld._Default'.
my web page is Default.aspx
what am i missing here?
|
|
|
|
|
Are you trying to access it from IIS ? Did you create Virtual Directory in IIS?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
no , haven't.
at the web configutation it stands on 'Use visual studio development server'
now i changed it to 'Use IIS web server'
how do i activate a virual IIS web server ?
start-> programs-> ... ?
i have it installed using the windows components add/remove but cant seem to find it
tnx
|
|
|
|
|
Hi,
Have You created a virtual directory of that Web site
If you have created the virtual directory then I think this should not come
|
|
|
|
|
shabya wrote: in order to jump to the cold water of asp i need a push.
sorry, I'm not pushing you to cold water. Try warm water instead.
Look, tell us the steps you took to build and publish your asp.net project. Something is not right.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
|
hi
i m using master page.In my application aspx pages are generated dynamically. is it possibile to attach them to my master page
programatically.
In my code i m doing
respponse.redirect("url");
i want this page add to my master page
|
|
|
|
|
Did you tried to give the master page name while generating the aspx page, like this.MasterPageFile = filename; . And make sure about contentPlaceHolderID in content page also.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi
Yes it is possible to attach MasterPage of your own choice in ASP.Net 2.0 or later.
You just has to set Page.MasterPageFile property in Page's PreInit Event.
Code
VB
<%@ Page Language="VB" %>
<script runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)
Page.MasterPageFile = "~/MyMasterPage.master"
End Sub
</script>
C#
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_PreInit(object sender, EventArgs e)
{
Page.MasterPageFile = "~/MyMasterPage.master";
}
</script>
Remeber Page's PREINIT Event only.
Precautions:
- There must present same contentplaceholders, as in MasterPage you want to attach dynamically.
- All content palceholders Ids must match with MasterPage you are binding at runtime.
Hope it will clear the concept.
To see video tutorial for the same provided my microsoft then visit: http://www.asp.net/learn/videos/video-265.aspx[^]
From:
Gaurav Mahajan [Website: www.sushilindia.com]
Senior Website Developer and Computer Lecturer
Ga
|
|
|
|
|
Hi All,
I am using MYSql DB for backend.I have fullfill all the requirment e.g. Dot Net Connector for MYSQL etc.
Now in my application I have seen a different type of bug. One of my project I create a class clsLogin and has a following method
public int AuthenticateUser(boclsLogin objboclsLogin)
{
int inRes = 0;
using (MySqlConnection mySqlCon = new MySqlConnection(ConfigurationManager.ConnectionStrings["MySqlCon"].ConnectionString.ToString()))
{
string strSQL = "select count(vcUSerId) from Login " +
" where vcUserId=@UserId ";
" and vcPassword=@Password" +
" and vcUserType=@UserType";
MySqlCommand _cmd = new MySqlCommand(strSQL, mySqlCon);
_cmd.Parameters.Add("@UserId", MySqlDbType.VarChar).Value = objboclsLogin.UserId;
_cmd.Parameters.Add("@Password", MySqlDbType.VarChar).Value = objboclsLogin.Password;
_cmd.Parameters.Add("@UserType", MySqlDbType.VarChar).Value = objboclsLogin.UserType;
if (mySqlCon.State == ConnectionState.Closed)
mySqlCon.Open();
inRes = Convert.ToInt32(_cmd.ExecuteScalar());
mySqlCon.Close();
}
return inRes;
}
the above method in native application works fine.But I have need the same class into a another project then i just copy paste the class File into my 2nd application it is return me a 0(scalar value).
But when i pass the hardcoded value into my query then it'll return me the 1.
So i am very phatectic,How I solve this anyone give me idea.
thanks in advance
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Hi
I do had problems with ExecuteScalar, So I suggest you just replace it with ExecuteReader and read value using DataReaderInstance(0) in vb.net DataReaderInstance[0] in C#.
Or if you are using .Net 3.5 version use LINQ to read data from database instead.
Hope this will solve your problem.
Gaurav Mahajan [website www.sushilindia.com], Amritsar
Website Developer and Computer Lecturer.
|
|
|
|
|
Hi,
I am working on a windows application in this when I click "GO to" button I have to check the browser window where my website is opened and in that I have to change the address in the address bar to another address.
or
I have to change the address in the current active browser window to the new address which will fixed by me.
Please send me reply if you know reply for any one of the above two.
Thank you.
|
|
|
|
|
hi,
let me know u want ur website in the exisiting c# application?if so use web browser control.
webbrowser1.navigate("google.com");
try this
cheers
venu gopal reddy
|
|
|
|
|
venu656 wrote: know u want ur
It very nice of you trying to help out.
Please to try to avoid txtspk.
thanks
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Nekkantidivya wrote: windows application in this when I click "GO to" button
There is no GO button on windows application? are you takling about web application?
Nekkantidivya wrote: I have to check the browser window where my website is opened and in that I have to change the address in the address bar to another address.
Why do you want to do this? You can not change the address but you can spoof it. One way is to host your page on Frames.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi All,
i have created dynamic button and adding them to the panel, when i click the button it refresh and buttons are vanish, i want to handle event of button to show value in textbox
|
|
|
|