|
You can use __doPostBack() function of javascript.
Please search for it, it will help you.
|
|
|
|
|
Hi,
please let me know the concept of Resolving class using interface using UNITY ...
with a simple example....
Just want to know the advantage of using this design pattern(Ioc)...and how does it makes difference from normal approach...and the the basic idea of why to use unity framework...
|
|
|
|
|
I'm using a Repeater to display a list of events. Here's a stripped down version of the code:
<asp:Repeater ID="rptEvents" runat="server">
<ItemTemplate>
<table style="width: 100%" border="1">
<tr>
<td style="width: 180px; white-space: nowrap;">
<img align="middle" alt="Events" src="images/thumbnail.png" style="width: 50px; height: 51px" />
<asp:Label ID="lblEventName" runat="server"></asp:Label>
</td>
<td>
<asp:Label ID="lblDescription" runat="server"></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
Notice that the first column has been set to "white-space: nowrap" so that longer event names will push the column to be wider. Here's some sample html that the Repeater would generate:
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl00_lblEventName">New Products Overview</span>
</td>
<td>
<span id="rptEvents_ctl00_lblDescription">Showcases the new products the will be released this year.</span>
</td>
</tr>
</table>
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl01_lblEventName">Supervisor Planning Meeting</span>
</td>
<td>
<span id="rptEvents_ctl01_lblDescription">All supervisors must be present.</span>
</td>
</tr>
</table>
<table style="width: 100%" border="1">
<tr>
<td style="width: 100px; white-space: nowrap;">
<img align="middle" alt="Events" src="thumbnail.png" />
<span id="rptEvents_ctl02_lblEventName">Holiday Weekend</span>
</td>
<td>
<span id="rptEvents_ctl02_lblDescription">The company will close for the week of Christmas.</span>
</td>
</tr>
</table>
If and when that occurs, I want the first column in each repeater item to be the same width as the column with the longest event name.
How can I do such a task? Would I have to employ some sort of javascript?
|
|
|
|
|
Hi
I am using Visual Web Developer 2010 Express to develop a website.
I am still busy developing the website, but my boss wants to demo what we have so far at a congress.
Is it possible to deploy the website on a temporary basis on a Windows XP Professional computer so that my boss can access it via the internet from the congress venue in another city?
Thank you for the help.
Kobus
|
|
|
|
|
It is - you have to install Internet Information Server, or use IIS Express[^] (I'd choose IIS Express if I were you).
|
|
|
|
|
Thanks for the reply.
I have IIS on the the XP machine and I have created a Virtual Directory to the website. I can access the website from the XP machine using http://xxx.xxx.xxx.xxx/websitename (where xxx.xxx.xxx.xxx is the IP address of the machine), but when I try to access it from another computer I cannot. It just says cannot display the website.
Kobus
|
|
|
|
|
You'll need to check the permissions in IIS to make sure that it allows access to external computers.
|
|
|
|
|
Hi Guys,
I have three Regex and would like to know if it's possible to combine them into one.
I'm validating phone numbers in the form:
- 0219081234
- 021 908 1234
- 021-908-1234
here are my regex for the above in order:
- var phoneRegex1 = /^(\d{3})(\d{3})(\d{4})$/;
- var phoneRegex2 = /^(\d{3})(\-)(\d{3})(\-)(\d{4})$/;
- var phoneRegex3 = /^(\d{3})(\ )(\d{3})(\ )(\d{4})$/;
Thanks in Advance,
Morgs
|
|
|
|
|
You should really consider asking this in the Regular Expressions forum. We have a dedicated forum for regexes.
|
|
|
|
|
|
Hi mates,
I'm trying to create a gridview with merging cells and an edit button on every column, not on row. When clicking the edit button, it will show a dropdownlist then the edit button will change to save/cancel. I've search already in google, lots of results on merging cells but my case is different. To make it clear. please see attached file.
[i_want_to_create_gridview_like_this!]
Thanks in advance.
C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
Hi All,
Suppose if i have a dropdown in a view page and if i select any value in the dropdown and the selected value needs to be passed to the different view.
please let me know how is it possible.(with an example)
Thanks in Advance.
|
|
|
|
|
You can use QueryString for this purpose.
Just google it, you will get a lot of examples on how you can use QueryString in MVC.
|
|
|
|
|
Hi,
I am trying to use custom configuration section in my application in the following way. But its giving me the as below, Did I do any mistake. What should I do when I get assembly load error. I have given the path and every thing correct only. What is the vshost.exe.config file.
Any body please help me any sort of help would be greatly appreciated. Thanks in advance.
An error occurred creating the configuration section handler for FamsTechnologyGroup/QUTransUnionSimulator: Could not load file or assembly 'FTG.QUTransUnionDataViewer' or one of its dependencies. The system cannot find the file specified. (C:\DEV\QUTU\Apps\QuarterlyUpdate\Ftg.Systems.QUTransUnionDataViewer\bin\Debug\Ftg.Systems.QUTransUnionDataViewer.vshost.exe.config line 5)
App Config
<configSections>
<sectionGroup name="FamsTechnologyGroup">
<section name="QUTransUnionSimulator"
type="Ftg.Systems.QUTransUnionDataViewer.QUTransUnionSimulatorConfiguration, FTG.QUTransUnionDataViewer"
allowLocation="true"
allowDefinition="Everywhere"/>
</sectionGroup>
</configSections>
<!-- Custom configuration tags -->
<FamsTechnologyGroup>
<QUTransUnionSimulator
InputFileFormat="INPUT"
ISMissing="True"
MissingSSN="555555555, 999999999, 888888888"
ISError="True"
ErrorSSN="000000000, 111111111"
CannedSuccessFilePath="\CannedReports\TU.CANNED.SUCCESS.pgp"
CannedErrorFilePath="\CannedReports\TU.CANNED.ERROR.pgp"
/>
<DataAccess DefaultAuditIdentifier="QUTransUnionSimulator" />
<ExceptionHandling LogName="Application" EventSource="FTG QUTransUnionSimulator" />
<!-- Service startup settings, built into the heartbeat framework -->
<!-- Service scheduling configration, built into the heartbeat framework -->
<ServiceConfiguration>
<Service ServiceType="QUTransUnionSimulator">
<HeartbeatServiceScheduler>
<ProcessingWindows>
<ProcessingWindow>
<Parameters CheckForWorkInterval="00:01:00" Enabled="true" />
</ProcessingWindow>
</ProcessingWindows>
</HeartbeatServiceScheduler>
</Service>
</ServiceConfiguration>
</FamsTechnologyGroup>
And Code that is trying to access the custom configuration section is
QUTransUnionSimulatorConfiguration obj =
(QUTransUnionSimulatorConfiguration)System.Configuration.ConfigurationManager.GetSection(
"FamsTechnologyGroup/QUTransUnionSimulator");
string cannedSuccessFileName = obj.CannedSuccessFilePath;
string cannedErrorFileName = obj.CannedErrorFilePath;
Custom Config Class
[ConfigurationSectionName("FamsTechnologyGroup/QUTransUnionSimulator")]
public class QUTransUnionSimulatorConfiguration : ConfigurationSection
{
public static QUTransUnionSimulatorConfiguration GetConfig()
{
QUTransUnionSimulatorConfiguration config = ConfigurationHelper<QUTransUnionSimulatorConfiguration>.GetConfig();
return config;
}
public QUTransUnionSimulatorConfiguration() { }
private static QUTransUnionSimulatorConfiguration sInstance;
static QUTransUnionSimulatorConfiguration()
{
try
{
sInstance = ConfigurationHelper<QUTransUnionSimulatorConfiguration>.GetConfig();
}
catch (Exception)
{
sInstance = new QUTransUnionSimulatorConfiguration();
}
}
public static QUTransUnionSimulatorConfiguration Instance
{
get { return sInstance; }
}
[ConfigurationProperty("InputFileFormat", DefaultValue = @"INPUT", IsRequired = true)]
public string InputFileFormat
{
get { return (string)this["InputFileFormat"]; }
set { this["InputFileFormat"] = value; }
}
[ConfigurationProperty("ISMissing", DefaultValue = @"True", IsRequired = true)]
public bool IsMissing
{
get { return (bool)this["ISMissing"]; }
set { this["ISMissing"] = value; }
}
[ConfigurationProperty("MissingSSN", DefaultValue = @"555555555", IsRequired = true)]
public string MissingSSN
{
get { return (string)this["MissingSSN"]; }
set { this["MissingSSN"] = value; }
}
[ConfigurationProperty("ISError", DefaultValue = @"True", IsRequired = true)]
public bool ISError
{
get { return (bool)this["ISError"]; }
set { this["ISError"] = value; }
}
[ConfigurationProperty("ErrorSSN", DefaultValue = @"000000000", IsRequired = true)]
public string ErrorSSN
{
get { return (string)this["ErrorSSN"]; }
set { this["ErrorSSN"] = value; }
}
[ConfigurationProperty("CannedSuccessFilePath", DefaultValue = @"\CannedReports\TU.CANNED.SUCCESS.pgp", IsRequired = true)]
public string CannedSuccessFilePath
{
get { return (string)this["CannedSuccessFilePath"]; }
set { this["CannedSuccessFilePath"] = value; }
}
[ConfigurationProperty("CannedErrorFilePath", DefaultValue = @"\CannedReports\TU.CANNED.ERROR.pgp", IsRequired = true)]
public string CannedErrorFilePath
{
get { return (string)this["CannedErrorFilePath"]; }
set { this["CannedErrorFilePath"] = value; }
}
}
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
indian143 wrote: What is the vshost.exe.config file.
That's the config file used while running the app from within Visual Studio.
What happens when you run the program from the exe in the debug directory directly, rather than from within VS? Same error?
|
|
|
|
|
How to run the program in the debug directory directly. I dont know how to run it in that way. Can you please help me or give me some idea?
Thanks a lot.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Go to C:\DEV\QUTU\Apps\QuarterlyUpdate\Ftg.Systems.QUTransUnionDataViewer\bin\Debug\ in Explorer and doubleclick
Ftg.Systems.QUTransUnionDataViewer.exe
The reason I asked is that sometimes paths in the config files will behave differently when run normally as opposed to being run is the debugger, especially if you use any System paths (doesn't look like that's the case here, though).
One thing I can say now, though, is if you don't have \CannedReports\TU.CANNED.SUCCESS.pgp and \CannedReports\TU.CANNED.ERROR.pgp also sitting in the debug directory, they won't be found by the program when running from within VisualStudio.
|
|
|
|
|
I have double clicked it still its giving me the same error
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
Well, then, it's gone beyond me for the moment.
This http://www.codeproject.com/KB/aspnet/ConfigSections.aspx might help more.
|
|
|
|
|
Where did you put your CongifurationHandler class? Is it in a separate assembly (.dll) or is it in the same assembly as your app?
|
|
|
|
|
Hello. I need to develop an sms application to send sms to all customers phone numbers immediately an item comes into stock. Please i need to understand the basics. How to cut out sms resellers and develop my own. please its important and urgent.
Thank you for your anticipated response and clear help.\
kind regards
hassan
stay jacking
|
|
|
|
|
|
Don't cross post, you have asked the same question in the C# forum.
|
|
|
|
|
hi
I want read the file base64 and show on the image control
thanks
|
|
|
|
|
Use a generic handler to read the base64 encoded image , decode it and output it to the browser. Feel free to use Session or Request to pass parameters to the handler to determine which file to read.
If you use ASP.NET 4 you can use the very convenient MemoryStream.CopyTo()-method, in versions below you'll have to do the copying yourself.
In your webform you can use it like this: <asp:Image ImageUrl="Base64ImageHandler.ashx" runat="server" /> (using the HTML img-element works too ofcourse)
<%@ WebHandler Language="C#" Class="Base64ImageHandler" %>
using System;
using System.Web;
using System.IO;
public class Base64ImageHandler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "image/jpeg";
string data64 = File.ReadAllText(@"e:\flotspe\www\images\5base64.txt");
byte[] data = Convert.FromBase64String(data64);
using (MemoryStream ms=new MemoryStream(data)) {
ms.CopyTo(context.Response.OutputStream);
}
}
public bool IsReusable {
get {
return false;
}
}
private static void CopyStream(Stream input, Stream output) {
byte[] buffer = new byte[32768];
while (true) {
int read = input.Read(buffer, 0, buffer.Length);
if (read <= 0)
return;
output.Write(buffer, 0, read);
}
}
}
|
|
|
|