|
In design mode drag the .ascx onto the form. put the control inside a panel
in the page load set panel.style.value = "display:none";
in ajax event when you want to display the ascx set panel.style.value = "";
Did that help?
I didn't get any requirements for the signature
|
|
|
|
|
Hello and thanks for your reply! Actually this did solve part of the problem. Now I do get html for the validators like this:
span id="Login1_validatorReqFieldUserName" style="color: Red; display: none;"
but I don´t seem to get the javascripts that makes the actual validation work.
|
|
|
|
|
ButtonClick
strSql = "Select [Type],[Image] from [Details]"
cClass.ExecuteReader(strSql)
If cClass.dataReader.Read Then
TextBox1.Text = cClass.dataReader.Item("Type").ToString
Image1.ImageUrl = cClass.dataReader.Item("Image")
End If
End ButtonClick
'Class here
Public Sub ExecuteReader(ByVal strSql As String)
Try
codeSuccess = False
dataCommand = New SqlCommand(strSql, oConn)
dataReader = dataCommand.ExecuteReader()
codeSuccess = True
Catch ex As Exception
errMsg = ex.Message.ToString
End Try
End Sub
'End Function
I want to show a pic in an Image1 but it does not work, any suggestions please.
Thanks in advance
Phetolel
|
|
|
|
|
phetolel wrote: but it does not work
what is happening?
Have you def got an image stored in the datbase, is it stored in the correct format?
We are not a Code Charity
|
|
|
|
|
I've got an image stored in ms sql 2005
the field is of image type.
thanks
|
|
|
|
|
what is happening?
Are you getting an error?
We are not a Code Charity
|
|
|
|
|
I'm getting this error
Conversion from type 'Byte()' to type 'String' is not valid.
|
|
|
|
|
check this out:
http://www.aspfree.com/c/a/ASP.NET/Retrieving-Images-from-a-Database--C---Part-II/
your error is a big clue, which line of the code does it have a problem with, is it this line:
TextBox1.Text = cClass.dataReader.Item("Type").ToString
We are not a Code Charity
|
|
|
|
|
i made a class to export gridview to excel.....its working fine on local server...but when i upload this class on server it is giving this error...
The name 'GridViewExportUtil' does not exist in the current context
please tell me how to use this class..
|
|
|
|
|
I might be wrong but is the class stored in the correct folder, i.e. app_code folder?
We are not a Code Charity
|
|
|
|
|
yeah i put my class in App_Code folder....should i make dll for my class...i didn't make that....please help me
|
|
|
|
|
It depends how your website functions.
Have you previously copied a dll across?
I know that if you write the c# in visual studio and then upload dll then the most updated pages of code must be in that dll
To answer your question then yes put it in the dll
We are not a Code Charity
|
|
|
|
|
I am getting a text box value in to a variable by using java script
a=document.getElementById("mstxtOSRPoor1").value;
How can I trim this text?
Thanks in adv
Balasubramanian K.
|
|
|
|
|
Check this out:
http://www.delphifaq.com/faq/f1031.shtml
We are not a Code Charity
|
|
|
|
|
Thank you very much. It is very useful.
Balasubramanian K.
|
|
|
|
|
faching a problem
Error 1 'System.Data.OleDb.OleDbCommand' does not contain a definition for 'BeginExecuteReader
how to solve this problem
if i use this process in sqlserver 2000 then no problem
but i use this process in access then i faching a problem
Thank's and Best Regords
Ashutosh
|
|
|
|
|
Can you post your entire code
We are not a Code Charity
|
|
|
|
|
IAsyncResult BeginAsyncWork1(Object sender, EventArgs e, AsyncCallback cb, object state)
{
string db = Server.MapPath("~/DB/AsynchronousProcess.mdb");
string connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" + db + "';";
_connection1 = new OleDbConnection(connectionstring);
_connection1.Open();
int i;
for (i = 2; i <= 1001; i++)
{
_command1 = new OleDbCommand("Insert Into Information values('xyz',#01/01/01#)", _connection1);
_command1.ExecuteNonQuery();
}
return _command1.BeginExecuteReader(cb, state);
}
|
|
|
|
|
check you have
using System.Data.OleDb;
at the top of your page
We are not a Code Charity
|
|
|
|
|
Hi,
i have one radgrid binded to datasource (clusters) of type clusterinfo.
this is my code.
public clusterInfo clusters;
radgrid1.datasource=clusters;
my problem is,
i want to get selected row of radgrid ,with row type clusterinfo.
Thanks in advance.
madhavi.kona
|
|
|
|
|
How to select your row?
in your ASP you can do
<ItemTemplate>
<asp:ImageButton runat="server" ID="imgAnnul" CssClass="GridPlaatje" ImageUrl="~/Images/NewDesign/trashcan.png" CommandName="AnnulGrid" AlternateText="Delete" OnCommand="Grid_OnCommand" /><asp:ImageButton runat="server" ID="imgEdit" CssClass="GridPlaatje" ImageUrl="~/Images/NewDesign/pencil.png" CommandName="EditGrid" AlternateText="Edit" OnCommand="Grid_OnCommand" />
</ItemTemplate>
in your code behind you create the method
protected void Grid_OnCommand(Object sender, CommandEventArgs e)
which has the next lines of code
ImageButton btn = (ImageButton)sender;
GridViewRow row = (GridViewRow)btn.NamingContainer;
if (e.CommandName.Equals("EditGrid"))
{
radgrid1.EditIndex = row.RowIndex;
}
else if (e.CommandName.Equals("CancelItem"))
{
radgrid1.EditIndex = -1;
}
else if (e.CommandName.Equals(<name you="" choose="">))
{
}
radgrid1.SelectedIndex = -1;
</name>
|
|
|
|
|
Hi,
I am using the MVVM Pattern to develop a wpf application.
Here I am unable to bind the selected row of a datagrid from view to viewmodel.
the code is like this:
<telerik:RadGridView ReorderColumnsMode="Interactive" Height="251" HorizontalAlignment="Left" SelectedItem="{Binding SelectedListCollection,Mode=Default}" Width="Auto" AutoGenerateColumns="False" ItemsSource="{Binding UserListCollection, Mode=TwoWay}">
both the SelectedListCollection and UserListCollection are of same type.
ObservableCollection<UserEntity>SelectedListCollection
ObservableCollection<UserEntity>UserListCollection
Can any one help me please....
Thanks in advance.
|
|
|
|
|
i am trying to convert any video file into .flv format. .avi,.wmv,.mpeg also convert successfully but .3gp not convert to .flv format. i will get zero bytes.. pls help me
Process ffmpeg; // creating process
string video;
string mpg;
video = HttpContext.Current.Server.MapPath("inputfolder\\uploads\\" + FileUpload1.FileName); // setting video input name with path
mpg = Page.MapPath("") + "\\video.flv"; // thumb name with path !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i " + video + "-s 480*360 -deinterlace -ab 32 -r 15 -ar 22050 -ac 1 " + mpg; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg\\ffmpeg.exe");
ffmpeg.Start(); // start !
ffmpeg.WaitForExit();
ffmpeg.Close();
string AppPath = Request.PhysicalApplicationPath; //This is the path of your application
//string inputPath = AppPath + "ffmpeg\\myVideo.wmv"; //Source Video Path
string inputPath = AppPath + "inputfolder\\uploads\\video.flv";
inputPath = FileUpload1.PostedFile.FileName;
FileUpload1.SaveAs(MapPath("inputfolder/" + FileUpload1.FileName));
string outputPath = AppPath + "outputfolder\\" + FileUpload1.FileName.Split('.')[0] + ".flv"; //Destination Video Path
string fileargs = " -i ";
fileargs += "\"" + inputPath + "\"";
fileargs += " \"" + outputPath + "\""; //Command Line
Process proc = new Process();
proc.StartInfo.FileName = AppPath + "ffmpeg\\ffmpeg.exe"; //Path of FFMPEG
proc.StartInfo.Arguments = fileargs;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.RedirectStandardOutput = true; ;
proc.StartInfo.RedirectStandardError = true;
proc.Start();
System.Threading.Thread.Sleep(1000);
string strErr = proc.StandardError.ReadToEnd();
proc.WaitForExit();
|
|
|
|
|
You asked this last week, were the answers not suitable?
We are not a Code Charity
|
|
|
|
|
i saw your reply but it is not suitable in my project
|
|
|
|