|
|
|
Thnks A lot man....itz working fine
|
|
|
|
|
Hi,
I want to use the Cascading dropdown control that populate from SQLServer database tables.
If any body have it's working code so please help me.
Thanks for your reply
Regards
Ratnesh Nirmal Bharos
( Web Developer Asp.net, C#)
|
|
|
|
|
|
|
I'm trying to validate an image before uploading to the server. Basically I want to validate the image width and height before uploading. I have seen this done before using javascript but thought maybe someone would have another solution?
ASP all the way
|
|
|
|
|
Well if you want it done prior to uploading then I'm afraid that javascript is your only method. Can't access a file server side without it being there after all.
Of course people disabling javascript would get around this so, you should really have a redundant check on the server side anyway.
|
|
|
|
|
thanks i see the problem. thanks for the advice tho.
ASP all the way
|
|
|
|
|
In Asp.NET you can check image file's height and width
before uploading it using following code.
Dim upBmp As Bitmap = Bitmap.FromStream(FileUpload1.PostedFile.InputStream)
Dim upWidth As Integer = upBmp.Width
Dim upHeight As Integer = upBmp.Height
But for that you need server trip.
So best way is using javascript.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
I'll try this method and see if it works for my scenario. thanks
ASP all the way
|
|
|
|
|
hi,
i have a we application and i have different settings for this application,
now i need multiple web.config files in the application,
how i can reference to those web.config files melodramatically at run time that which one's settings is going to be used this time,
can any body explain it please,
|
|
|
|
|
|
The usage of multiple configuration file makes the application more secure and manageable.
In the following tutorial you can learn how to use multiple web.config files in your application.
Regards,
Jamil
|
|
|
|
|
Hi, I want to return selected items (check box list) on button click of a user control to the parent page.
How do I do this ? The checked items would be in form of List<>.
I have made the user control but don't know how to pass an input id to it to fetch the records and on button click, return them.
|
|
|
|
|
Just make one public method of your user control
which returns List<> items [Contains selected items].
That's it. You need to access that particular method once
button click is over.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Update:
Ok, I created two public properties, now I want to return the selected checkbox items in the checkbox list and return them on button click so I used a foreach, not much sure about my approach.Here is how its looking now. How to bind the results with parent page gridview on user control button click ?
public partial class assets_WebControls_ftExclusions : System.Web.UI.UserControl
{
private int id;
private ftExclusionsList myftExclusions;
public int ID
{
get{return ID;}
set{ID=value;}
}
public ftExclusionsList selectedExclusions
{
get { return myftExclusions; }
set { myftExclusions = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
cblExclusions.DataBind();
ftExclusionsList myExcluList = ftExclusionsManager.ftExclusionsById(ID);
if (myExcluList != null)
{
if (myExcluList.Count > 0 && myExcluList != null)
{
foreach (ftExclusions ex in myExcluList)
{
cblExclusions.Items.FindByValue(ex.excluId.ToString()).Selected = true;
}
}
}
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
ftExclusionsList myFTExclusionList = new ftExclusionsList();
foreach (ListItem li in cblExclusions.Items)
{
if (li.Selected == true)
{
ftExclusions myftExclusion = new ftExclusions();
myftExclusion.ftExcluId = Convert.ToInt32(li.Value);
myftExclusion.excludesc = li.Text.ToString();
myFTExclusionList.Add(myftExclusion);
}
}
selectedExclusions = myFTExclusionList;
}
}
modified on Friday, May 28, 2010 7:53 AM
|
|
|
|
|
Hi
I want to make my website url like
www.websitename.com/username
Just like twitter in which we have
twitter.com/username
How to achieve this
Please help
Thanks in advance
|
|
|
|
|
|
hi to all,
i am new in asp.net,
i want to create parameterised crystal report. i did it i create parameter "Empid " using "Parameter Fields"
then i want to show the report on click event of button so code is as follows,
<br />
Protected Sub btnShow_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnShow.Click <br />
Dim ConnInfo As New ConnectionInfo <br />
With ConnInfo <br />
.ServerName = ".sqlexpress" <br />
.DatabaseName = "Northwind" <br />
.UserID = "sa" <br />
.Password = "" <br />
End With <br />
<br />
Me.CrystalReportViewer1.ParameterFieldInfo.Clear() <br />
If Me.txtEmployeeID.Text.Trim.Length > 0 Then <br />
Me.CrystalReportViewer1.ReportSource = Server.MapPath("SampleParam1.rpt") <br />
Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo <br />
Dim p_EmpID As New ParameterField <br />
p_EmpID.Name = "p_EmployeeID" <br />
Dim p_EmpID_Value As New ParameterDiscreteValue <br />
p_EmpID_Value.Value = Me.txtEmployeeID.Text <br />
p_EmpID.CurrentValues.Add(p_EmpID_Value) <br />
ParamFields.Add(p_EmpID) <br />
Else <br />
Me.CrystalReportViewer1.ReportSource = Server.MapPath("SampleRpt01.rpt") <br />
End If <br />
<br />
For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo <br />
cnInfo.ConnectionInfo = ConnInfo <br />
Next <br />
Me.CrystalReportViewer1.RefreshReport() <br />
End Sub <br />
i am using sql2000, but after the clicking on button it will show me an error ,"Object Reference not set to an instance of an object".
why i gives me error?
is the servername is wrong? what the name should i provide? my database is on another computer and i am accessing it through networking
the name of the computer is "RS1" so should i give the servername="RS1"
if i debug the code , CrystalReportViewer1.LogOnInfo have count=0.
what is error?
|
|
|
|
|
i have below code.
string strTest = "Codes";
Response.Redirect("default2.aspx?jungPara="+strTest+"");
but client received address by get method so all of parameters can be displayed.
so i fix method to post.
<form method="post"
but i does't work by post.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Try this:
<form method="post" name="customerlinkform">
Then put the customerlinkform.submit() in a button.
Doing so should hide the querystring.
|
|
|
|
|
hi,
When the source page uses the HTTP POST action to navigate to the target page, you can retrieve posted values from the Form collection in the target page. Note that you can get only the post values; you cannot read the values of arbitrary controls on the page.
To get the values of controls from the source page in another application
1. In the source page, include a form element that contains HTML elements (such as input or textarea) or ASP.NET server controls (such as TextBox or DropDownList controls) that post values when the form is submitted.
2. In the target page, read the Form collection, which returns a dictionary of name/value pairs, one pair for each posted value.
The following code example displays the ID and value of every posted control in the source page and displays the posted values in a label named Label1.
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.Load
Dim displayValues As New StringBuilder()
Dim postedValues As NameValueCollection = Request.Form
Dim nextKey As String
For i As Integer = 0 To postedValues.AllKeys.Length - 1
nextKey = postedValues.AllKeys(i)
If nextKey.Substring(0, 2) <> "__" Then
displayValues.Append("<br>")
displayValues.Append(nextKey)
displayValues.Append(" = ")
displayValues.Append(postedValues(i))
End If
Next
Label1.Text = displayValues.ToString()
End Sub
For more help refer following link...
http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx[^]
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Hi,
There is an initiative to upgrade browser on desktop from IE 6 to IE 8. As part of this initiative, all web based applications need to be remediated/tested in order to ensure that they work correctly in IE8. Please let me know on how we can identify the impacted web applications due to this initiative.
Please share if there is any standard approach or tools to address such requirement.
Kindly redirect me to any tool which will solve this purpose.
Thanks in advance.
Regards,
Riz
|
|
|
|
|
There should no impact Ideally when you upgrade your browser if you(and all your 3rd party tools) have not used any depreciated javascript code.
But, still testing the javascript part only should be sufficient. Moreover, you might get a few alignment issue depends on the way you have written your html code.
Hope this will help.
|
|
|
|