|
|
Hello friends,
I know i have posted similar thing yesterday but i didn't got my solution yet.
I am using popup window in my application which i am creating like this
<script type="text/javascript">
function Open() {
window.open('SearchBOM.aspx','myWin','scrollbars=no,width=500,height=500,resizable=no');
}
</script>
<a href="javascript:;" onClick="Open()">Search</a>
I want to pass a string value to my SearchBOM.aspx page, which i'll enter in a TextBox.
I tried using Session variables, but i found out on net that i can't use sessions in client side code.
Then i used HiddenField for the purpose but still it didn't helped me.
Now i want to try for QueryString option.
I know i have to pass it by putting '?' after pagename but it still giving me errors.
Am missing something? Can anybody help me?
Also i am using Content PAge and not a normal web page.
Thanks,
Nagendra.
|
|
|
|
|
You're still working on this?
<script type="text/javascript"><br />
function Open()<br />
{<br />
var uri = "SearchBOM.aspx?[param-name]=" + [value];<br />
window.open(uri,'myWin','scrollbars=no,width=500,height=500,resizable=no');<br />
}<br />
</script>
only two letters away from being an asset
|
|
|
|
|
Hey Thanks man, i combined the results mentioned by u and some other on net and i got it worked.
|
|
|
|
|
Dear Everybdy
i want to get only year of the system ,so plz help me.
thanks and regards
vivek sachan
|
|
|
|
|
It'll give u year of System Date
System.DateTime.Now.Year;
|
|
|
|
|
That will give you the year on the server. I assume he knows that, and wants the year on the client
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.
|
|
|
|
|
Hi Christian How Can we get the client system date Without using Javascript
|
|
|
|
|
hello every one i am trying to make a method which takes vaolues of controls and insert those into database.
I am giving the code.
The error message is ==" memory allocation "
==============code of Function is====================================
string cmdtext = "CALL INSERT_PROCEDURE(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
cmd = new OdbcCommand(cmdtext, con);
OdbcParameter p2 = new OdbcParameter("_section", OdbcType.VarChar,50);
p2.Value = @section ;
OdbcParameter p3 = new OdbcParameter("_Broad_Cat", OdbcType.VarChar,50);
p3.Value = @Broad_Cat;
OdbcParameter p4 = new OdbcParameter("_Cat", OdbcType.VarChar,50);
p4.Value = @Cat;
OdbcParameter p5 = new OdbcParameter("_Attribute1", OdbcType.VarChar,50);
p5.Value = @Attribute1;
OdbcParameter p6 = new OdbcParameter("_Attribute2", OdbcType.VarChar,50);
p6.Value = @Attribute2;
OdbcParameter p7 = new OdbcParameter("_Attribute3", OdbcType.VarChar,50);
p7.Value = @Attribute3;
OdbcParameter p8 = new OdbcParameter("_Attribute4", OdbcType.VarChar,50);
p8.Value = @Attribute4;
OdbcParameter p9 = new OdbcParameter("_Attribute5", OdbcType.VarChar,50);
p9.Value = @Attribute5;
OdbcParameter p10 = new OdbcParameter("_Loaction", OdbcType.VarChar,50);
p10.Value = @Location ;
OdbcParameter p11 = new OdbcParameter("_pincode", OdbcType.VarChar,50);
p11.Value = @Pincode;
OdbcParameter p12 = new OdbcParameter("_Locality", OdbcType.VarChar,50);
p12.Value = @Locality ;
OdbcParameter p13 = new OdbcParameter("_Description", OdbcType.VarChar,50);
p13.Value = @Description;
OdbcParameter p14 = new OdbcParameter("_Image", OdbcType.VarChar,50 );
p14.Value = @Image;
OdbcParameter p15 = new OdbcParameter("_Total_Char", OdbcType.VarChar,50);
p15.Value = @Total_Char ;
OdbcParameter p16 = new OdbcParameter("_Extra_Cha", OdbcType.VarChar,50);
p16.Value = @Extra_Char ;
OdbcParameter p17 = new OdbcParameter("_WebPage_Link", OdbcType.VarChar,50);
p17.Value = @Web_Link ;
OdbcParameter p18 = new OdbcParameter("_Email_id", OdbcType.VarChar,50);
p18.Value = @Email_Id;
OdbcParameter p19 = new OdbcParameter("_Total_Cost", OdbcType.VarChar,50);
p19.Value = @Total_Cost;
OdbcParameter p20 = new OdbcParameter("_Duration", OdbcType.VarChar,50);
p20.Value = @Duration;
OdbcParameter p21 = new OdbcParameter("_Status", OdbcType.VarChar,50);
p21.Value = @Status;
cmd.Parameters.Add(p2);
cmd.Parameters.Add(p3);
cmd.Parameters.Add(p4);
cmd.Parameters.Add(p5);
cmd.Parameters.Add(p6);
cmd.Parameters.Add(p7);
cmd.Parameters.Add(p8);
cmd.Parameters.Add(p9);
cmd.Parameters.Add(p10);
cmd.Parameters.Add(p11);
cmd.Parameters.Add(p12);
cmd.Parameters.Add(p13);
cmd.Parameters.Add(p14);
cmd.Parameters.Add(p15);
cmd.Parameters.Add(p16);
cmd.Parameters.Add(p17);
cmd.Parameters.Add(p18);
cmd.Parameters.Add(p19);
cmd.Parameters.Add(p20);
cmd.Parameters.Add(p21);
con.Open();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
con.Close();
======================function is getting call here==============
CodeClass.insert_values(con, cmd, ddlSection.SelectedItem.Text, "employee", null, null, ddlJobType.SelectedItem.Text, ddlIndustry.SelectedItem .Text, null, null, ddlLocation2.SelectedItem.Text, ddlPincode2.SelectedItem.Text, ddlLocality2.SelectedItem .Text, txtDescription.Text, null, txtCalculator.Text, txtExtra.Text, txtweblink.Text, txtEmailId.Text, txtTotalCost.Text, ddlDuration.SelectedItem.Text, "Tempraroy");
|
|
|
|
|
|
This is really, really nasty.
The issue as far as I can see is that you have 21 ? and you're only adding 20 parameters. I'd suggest cleaning this code up.
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.
|
|
|
|
|
i have a gridview using edittemplate i put it in a panel and use scroll bars. It doesnot work my gridview is hide when i put it in gridview, i also bring it in front but still hide.
help plz
|
|
|
|
|
Put your gridview inside div and set the overflow property of the div, also set height and width properties of the div.
HTH
|
|
|
|
|
how i set overflow property in div?
|
|
|
|
|
You need to use
overflow:scroll to the container that holds the grid.
|
|
|
|
|
|
Hi ,
We are facing a problem when I want bind dropdown list in footer row
code is..
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
ds = new DataSet();
ds.Reset();
ad = new SqlDataAdapter("select * from States", con.cn);
ad.Fill(ds, "tmp");
**DropDownList drp=(DropDownList)GridView1.FooterRow.FindControl("DropDownList1");//** In this line We are getting error object reference is no set an instance
drp.DataSource = ds.Tables["tmp"];
drp.DataValueField = "stateid";
drp.DataTextField = "statename";
drp.DataBind();
}
}
|
|
|
|
|
samar123 wrote: **DropDownList drp=(DropDownList)GridView1.FooterRow.FindControl("DropDownList1");//** In this line We are getting error object reference is no set an instance
Have you considered using real variable names, or are you trying to make your code hard to read ? What does your aspx look like ? I would recommend before you ever consider charging anyone for your code, that you learn how to write professional code as it pertains to database access. I'd fire anyone who wrote SQL in the presentation layer. What insanity is it that you want to rebind this control once for every row in your grid ?
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.
|
|
|
|
|
Dear , it may be some problem in my code , I am beginer in devlopment just try to understand my problem.I want to bind drop downlist in in footer row of gridview thanks for reply........
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
DropDownList drp=(DropDownList)GridView1.FooterRow.FindControl("DropDownList1");//error in this line
drp.DataSource = ds.Tables["tmp"];
drp.DataValueField = "stateid";
drp.DataTextField = "statename";
drp.DataBind();
}
|
|
|
|
|
If you're a beginner, I assume no-one is paying for this code. It's sure not worth any money. So, instead of trying to solve this problem ( and this code is FULL of problems ), why not start slower and work through a book. You won't have to worry about sticking to a specific problem and solving it, until your code is at a professional standard, and someone is paying for it.
There is so much wrong with this code, I wouldn't know where to start.
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.
|
|
|
|
|
Dear ,instead of telling my answer you are focusing my question pattern. you should first tell me my answer and realize me what was wrong in my code.I am newly appointed in a company so may be there was many mistakes.
Dear Sir, ignore mistakes and just send me code in which we know my mistakes. my porblem is still same how to to bind a dropdownlist in gridview footer row......
|
|
|
|
|
where is
if(e.Row.RowType == DataControlRowType.DataRow)
{
ds = new DataSet();
ad = new SqlDataAdapter("select * from States", con.cn);
ad.Fill(ds, "tmp");
DropDownList drp=(DropDownList)GridView1.FooterRow.FindControl("DropDownList1");
drp.DataSource = ds.Tables["tmp"];
drp.DataValueField = "stateid";
drp.DataTextField = "statename";
drp.DataBind();
}
Check it ...
|
|
|
|
|
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
DropDownList drp=(DropDownList)GridView1.FooterRow.FindControl("DropDownList1");//error in this line
drp.DataSource = ds.Tables["tmp"];
drp.DataValueField = "stateid";
drp.DataTextField = "statename";
drp.DataBind();
}
|
|
|
|
|
Yes.. If your footer contains the control, find only in the footer...
where is if condition before running FindControl .
|
|
|
|
|
Thanks Dear.........
|
|
|
|
|